parser/tests/0024/tokens.txt
Saif Eddin Gmati ac42958b4f chore: refactor project structure
- added `prelude`
- moved `ast` to `parser`
- moved `Lexer` from `crate::lexer::lexer::Lexer` to `crate::lexer::Lexer`
- renamed `LexerError` to `SyntaxError`
- moved `SyntaxError` to `token::error`
- implemented `Display` for `SyntaxError`
- add `tokens.txt` to integration tests
- removed all unit tests for `Lexer` ( everything is tested in integration tests )
- improved syntax error assertations
2022-12-04 08:56:53 +00:00

415 lines
5.9 KiB
Plaintext

[
Token {
kind: OpenTag(
Full,
),
span: (
1,
1,
),
},
Token {
kind: Try,
span: (
3,
1,
),
},
Token {
kind: LeftBrace,
span: (
3,
5,
),
},
Token {
kind: RightBrace,
span: (
5,
1,
),
},
Token {
kind: Catch,
span: (
5,
3,
),
},
Token {
kind: LeftParen,
span: (
5,
9,
),
},
Token {
kind: Identifier(
"Exception",
),
span: (
5,
10,
),
},
Token {
kind: Variable(
"e",
),
span: (
5,
20,
),
},
Token {
kind: RightParen,
span: (
5,
22,
),
},
Token {
kind: LeftBrace,
span: (
5,
24,
),
},
Token {
kind: RightBrace,
span: (
7,
1,
),
},
Token {
kind: Catch,
span: (
7,
3,
),
},
Token {
kind: LeftParen,
span: (
7,
9,
),
},
Token {
kind: Identifier(
"CustomException",
),
span: (
7,
10,
),
},
Token {
kind: Variable(
"e",
),
span: (
7,
26,
),
},
Token {
kind: RightParen,
span: (
7,
28,
),
},
Token {
kind: LeftBrace,
span: (
7,
30,
),
},
Token {
kind: RightBrace,
span: (
9,
1,
),
},
Token {
kind: Try,
span: (
11,
1,
),
},
Token {
kind: LeftBrace,
span: (
11,
5,
),
},
Token {
kind: RightBrace,
span: (
13,
1,
),
},
Token {
kind: Catch,
span: (
13,
3,
),
},
Token {
kind: LeftParen,
span: (
13,
9,
),
},
Token {
kind: Identifier(
"Exception",
),
span: (
13,
10,
),
},
Token {
kind: Variable(
"e",
),
span: (
13,
20,
),
},
Token {
kind: RightParen,
span: (
13,
22,
),
},
Token {
kind: LeftBrace,
span: (
13,
24,
),
},
Token {
kind: RightBrace,
span: (
15,
1,
),
},
Token {
kind: Finally,
span: (
15,
3,
),
},
Token {
kind: LeftBrace,
span: (
15,
11,
),
},
Token {
kind: RightBrace,
span: (
17,
1,
),
},
Token {
kind: Try,
span: (
19,
1,
),
},
Token {
kind: LeftBrace,
span: (
19,
5,
),
},
Token {
kind: RightBrace,
span: (
21,
1,
),
},
Token {
kind: Finally,
span: (
21,
3,
),
},
Token {
kind: LeftBrace,
span: (
21,
11,
),
},
Token {
kind: RightBrace,
span: (
21,
12,
),
},
Token {
kind: Try,
span: (
23,
1,
),
},
Token {
kind: LeftBrace,
span: (
23,
5,
),
},
Token {
kind: RightBrace,
span: (
25,
1,
),
},
Token {
kind: Catch,
span: (
25,
3,
),
},
Token {
kind: LeftParen,
span: (
25,
9,
),
},
Token {
kind: Identifier(
"Exception",
),
span: (
25,
10,
),
},
Token {
kind: RightParen,
span: (
25,
19,
),
},
Token {
kind: LeftBrace,
span: (
25,
21,
),
},
Token {
kind: RightBrace,
span: (
27,
1,
),
},
Token {
kind: Try,
span: (
29,
1,
),
},
Token {
kind: LeftBrace,
span: (
29,
5,
),
},
Token {
kind: RightBrace,
span: (
31,
1,
),
},
Token {
kind: Catch,
span: (
31,
3,
),
},
Token {
kind: LeftParen,
span: (
31,
9,
),
},
Token {
kind: Identifier(
"Exception",
),
span: (
31,
10,
),
},
Token {
kind: Variable(
"e",
),
span: (
31,
20,
),
},
Token {
kind: RightParen,
span: (
31,
22,
),
},
Token {
kind: LeftBrace,
span: (
31,
24,
),
},
Token {
kind: RightBrace,
span: (
33,
1,
),
},
]