ps6: task 3
This commit is contained in:
@@ -527,6 +527,12 @@ static void generate_break_statement()
|
||||
// Generate the break statement, jumping out past the end of the current innermost while loop.
|
||||
// You can use a global variable to keep track of the current innermost call to
|
||||
// generate_while_statement().
|
||||
|
||||
char target[8];
|
||||
snprintf(target, 8, "ENDWH%d", root_while+nesting_level-1);
|
||||
|
||||
JMP(target);
|
||||
|
||||
}
|
||||
|
||||
// Recursively generate the given statement node, and all sub-statements.
|
||||
|
||||
Reference in New Issue
Block a user