- 'i': Insert text before cursor
- 'I': Insert at beginning of line
- 'a': Append text after cursor
- 'A': Append thext at end of line
- 'o': Add new line after current
- 'O': Add new line before current
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Compiler | |
// | |
static void endScope() { | |
current->scopeDepth--; | |
while (current->localCount > 0 && | |
current->locals[current->localCount - 1].depth > | |
current->scopeDepth) { | |
if (current->locals[current->localCount - 1].isCaptured) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
program : statement_seq | |
statement_seq : statement {sep statement} | |
statement : var_decl | |
| class_decl | |
| method_decl | |
| "if" expression opt_then statement_seq ["else" statement_seq] "end" | |
| "while" expression opt_do statement_seq "end" | |
| "return" expression |
OlderNewer