-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add errors for break/continue labels
- Loading branch information
Showing
32 changed files
with
1,731 additions
and
26 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
47 changes: 47 additions & 0 deletions
47
...is__parse__lexer__tests__test_programs__err_compile__break_label_missing.blis.tokens.snap
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
--- | ||
source: src/parse/lexer.rs | ||
description: "loop outer {\n break inner;\n}\n" | ||
input_file: test_programs/err_compile/break_label_missing.blis | ||
--- | ||
[ | ||
Lexeme( | ||
token: Loop, | ||
text: "loop", | ||
line: 1, | ||
), | ||
Lexeme( | ||
token: Identifier, | ||
text: "outer", | ||
line: 1, | ||
), | ||
Lexeme( | ||
token: LeftBrace, | ||
text: "{", | ||
line: 1, | ||
), | ||
Lexeme( | ||
token: Break, | ||
text: "break", | ||
line: 2, | ||
), | ||
Lexeme( | ||
token: Identifier, | ||
text: "inner", | ||
line: 2, | ||
), | ||
Lexeme( | ||
token: Semicolon, | ||
text: ";", | ||
line: 2, | ||
), | ||
Lexeme( | ||
token: RightBrace, | ||
text: "}", | ||
line: 3, | ||
), | ||
Lexeme( | ||
token: Eof, | ||
text: "", | ||
line: 4, | ||
), | ||
] |
47 changes: 47 additions & 0 deletions
47
..._parse__lexer__tests__test_programs__err_compile__continue_label_missing.blis.tokens.snap
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
--- | ||
source: src/parse/lexer.rs | ||
description: "loop outer {\n continue inner;\n}\n" | ||
input_file: test_programs/err_compile/continue_label_missing.blis | ||
--- | ||
[ | ||
Lexeme( | ||
token: Loop, | ||
text: "loop", | ||
line: 1, | ||
), | ||
Lexeme( | ||
token: Identifier, | ||
text: "outer", | ||
line: 1, | ||
), | ||
Lexeme( | ||
token: LeftBrace, | ||
text: "{", | ||
line: 1, | ||
), | ||
Lexeme( | ||
token: Continue, | ||
text: "continue", | ||
line: 2, | ||
), | ||
Lexeme( | ||
token: Identifier, | ||
text: "inner", | ||
line: 2, | ||
), | ||
Lexeme( | ||
token: Semicolon, | ||
text: ";", | ||
line: 2, | ||
), | ||
Lexeme( | ||
token: RightBrace, | ||
text: "}", | ||
line: 3, | ||
), | ||
Lexeme( | ||
token: Eof, | ||
text: "", | ||
line: 4, | ||
), | ||
] |
2 changes: 1 addition & 1 deletion
2
...s__err_runtime__bad_math.blis.tokens.snap → ..._err_runtime__bad_math_1.blis.tokens.snap
This file contains 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
47 changes: 47 additions & 0 deletions
47
...pshots/blis__parse__lexer__tests__test_programs__err_runtime__bad_math_2.blis.tokens.snap
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
--- | ||
source: src/parse/lexer.rs | ||
description: "println(1 + 2.0);\n" | ||
input_file: test_programs/err_runtime/bad_math_2.blis | ||
--- | ||
[ | ||
Lexeme( | ||
token: Identifier, | ||
text: "println", | ||
line: 1, | ||
), | ||
Lexeme( | ||
token: LeftParen, | ||
text: "(", | ||
line: 1, | ||
), | ||
Lexeme( | ||
token: Integer, | ||
text: "1", | ||
line: 1, | ||
), | ||
Lexeme( | ||
token: Plus, | ||
text: "+", | ||
line: 1, | ||
), | ||
Lexeme( | ||
token: Float, | ||
text: "2.0", | ||
line: 1, | ||
), | ||
Lexeme( | ||
token: RightParen, | ||
text: ")", | ||
line: 1, | ||
), | ||
Lexeme( | ||
token: Semicolon, | ||
text: ";", | ||
line: 1, | ||
), | ||
Lexeme( | ||
token: Eof, | ||
text: "", | ||
line: 2, | ||
), | ||
] |
This file contains 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
Oops, something went wrong.