parser/tests/0020/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

812 lines
12 KiB
Plaintext

[
Token {
kind: OpenTag(
Full,
),
span: (
1,
1,
),
},
Token {
kind: LiteralInteger(
6,
),
span: (
3,
1,
),
},
Token {
kind: Percent,
span: (
3,
3,
),
},
Token {
kind: LiteralInteger(
2,
),
span: (
3,
5,
),
},
Token {
kind: SemiColon,
span: (
3,
6,
),
},
Token {
kind: LiteralInteger(
6,
),
span: (
4,
1,
),
},
Token {
kind: LeftShift,
span: (
4,
3,
),
},
Token {
kind: LiteralInteger(
2,
),
span: (
4,
6,
),
},
Token {
kind: SemiColon,
span: (
4,
7,
),
},
Token {
kind: LiteralInteger(
6,
),
span: (
5,
1,
),
},
Token {
kind: RightShift,
span: (
5,
3,
),
},
Token {
kind: LiteralInteger(
2,
),
span: (
5,
6,
),
},
Token {
kind: SemiColon,
span: (
5,
7,
),
},
Token {
kind: LiteralInteger(
6,
),
span: (
6,
1,
),
},
Token {
kind: Ampersand,
span: (
6,
3,
),
},
Token {
kind: LiteralInteger(
2,
),
span: (
6,
5,
),
},
Token {
kind: SemiColon,
span: (
6,
6,
),
},
Token {
kind: LiteralInteger(
6,
),
span: (
7,
1,
),
},
Token {
kind: Pipe,
span: (
7,
3,
),
},
Token {
kind: LiteralInteger(
2,
),
span: (
7,
5,
),
},
Token {
kind: SemiColon,
span: (
7,
6,
),
},
Token {
kind: LiteralInteger(
6,
),
span: (
8,
1,
),
},
Token {
kind: Caret,
span: (
8,
3,
),
},
Token {
kind: LiteralInteger(
2,
),
span: (
8,
5,
),
},
Token {
kind: SemiColon,
span: (
8,
6,
),
},
Token {
kind: LiteralInteger(
6,
),
span: (
9,
1,
),
},
Token {
kind: AngledLeftRight,
span: (
9,
3,
),
},
Token {
kind: LiteralInteger(
2,
),
span: (
9,
6,
),
},
Token {
kind: SemiColon,
span: (
9,
7,
),
},
Token {
kind: LiteralInteger(
6,
),
span: (
10,
1,
),
},
Token {
kind: Spaceship,
span: (
10,
3,
),
},
Token {
kind: LiteralInteger(
2,
),
span: (
10,
7,
),
},
Token {
kind: SemiColon,
span: (
10,
8,
),
},
Token {
kind: LiteralInteger(
6,
),
span: (
11,
1,
),
},
Token {
kind: LogicalAnd,
span: (
11,
3,
),
},
Token {
kind: LiteralInteger(
2,
),
span: (
11,
7,
),
},
Token {
kind: SemiColon,
span: (
11,
8,
),
},
Token {
kind: LiteralInteger(
6,
),
span: (
12,
1,
),
},
Token {
kind: LogicalOr,
span: (
12,
3,
),
},
Token {
kind: LiteralInteger(
2,
),
span: (
12,
6,
),
},
Token {
kind: SemiColon,
span: (
12,
7,
),
},
Token {
kind: LiteralInteger(
6,
),
span: (
13,
1,
),
},
Token {
kind: LogicalXor,
span: (
13,
3,
),
},
Token {
kind: LiteralInteger(
2,
),
span: (
13,
7,
),
},
Token {
kind: SemiColon,
span: (
13,
8,
),
},
Token {
kind: Variable(
"a",
),
span: (
14,
1,
),
},
Token {
kind: Equals,
span: (
14,
4,
),
},
Token {
kind: LiteralInteger(
1,
),
span: (
14,
6,
),
},
Token {
kind: SemiColon,
span: (
14,
7,
),
},
Token {
kind: Variable(
"a",
),
span: (
15,
1,
),
},
Token {
kind: PlusEquals,
span: (
15,
4,
),
},
Token {
kind: LiteralInteger(
1,
),
span: (
15,
7,
),
},
Token {
kind: SemiColon,
span: (
15,
8,
),
},
Token {
kind: Variable(
"a",
),
span: (
16,
1,
),
},
Token {
kind: MinusEquals,
span: (
16,
4,
),
},
Token {
kind: LiteralInteger(
1,
),
span: (
16,
7,
),
},
Token {
kind: SemiColon,
span: (
16,
8,
),
},
Token {
kind: Variable(
"a",
),
span: (
17,
1,
),
},
Token {
kind: AsteriskEqual,
span: (
17,
4,
),
},
Token {
kind: LiteralInteger(
1,
),
span: (
17,
7,
),
},
Token {
kind: SemiColon,
span: (
17,
8,
),
},
Token {
kind: Variable(
"a",
),
span: (
18,
1,
),
},
Token {
kind: PowEquals,
span: (
18,
4,
),
},
Token {
kind: LiteralInteger(
1,
),
span: (
18,
8,
),
},
Token {
kind: SemiColon,
span: (
18,
9,
),
},
Token {
kind: Variable(
"a",
),
span: (
19,
1,
),
},
Token {
kind: SlashEquals,
span: (
19,
4,
),
},
Token {
kind: LiteralInteger(
1,
),
span: (
19,
7,
),
},
Token {
kind: SemiColon,
span: (
19,
8,
),
},
Token {
kind: Variable(
"a",
),
span: (
20,
1,
),
},
Token {
kind: DotEquals,
span: (
20,
4,
),
},
Token {
kind: LiteralInteger(
1,
),
span: (
20,
7,
),
},
Token {
kind: SemiColon,
span: (
20,
8,
),
},
Token {
kind: Variable(
"a",
),
span: (
21,
1,
),
},
Token {
kind: PercentEquals,
span: (
21,
4,
),
},
Token {
kind: LiteralInteger(
1,
),
span: (
21,
7,
),
},
Token {
kind: SemiColon,
span: (
21,
8,
),
},
Token {
kind: Variable(
"a",
),
span: (
22,
1,
),
},
Token {
kind: AmpersandEquals,
span: (
22,
4,
),
},
Token {
kind: LiteralInteger(
1,
),
span: (
22,
7,
),
},
Token {
kind: SemiColon,
span: (
22,
8,
),
},
Token {
kind: Variable(
"a",
),
span: (
23,
1,
),
},
Token {
kind: PipeEquals,
span: (
23,
4,
),
},
Token {
kind: LiteralInteger(
1,
),
span: (
23,
7,
),
},
Token {
kind: SemiColon,
span: (
23,
8,
),
},
Token {
kind: Variable(
"a",
),
span: (
24,
1,
),
},
Token {
kind: CaretEquals,
span: (
24,
4,
),
},
Token {
kind: LiteralInteger(
1,
),
span: (
24,
7,
),
},
Token {
kind: SemiColon,
span: (
24,
8,
),
},
Token {
kind: Variable(
"a",
),
span: (
25,
1,
),
},
Token {
kind: LeftShiftEquals,
span: (
25,
4,
),
},
Token {
kind: LiteralInteger(
1,
),
span: (
25,
8,
),
},
Token {
kind: SemiColon,
span: (
25,
9,
),
},
Token {
kind: Variable(
"a",
),
span: (
26,
1,
),
},
Token {
kind: RightShiftEquals,
span: (
26,
4,
),
},
Token {
kind: LiteralInteger(
1,
),
span: (
26,
8,
),
},
Token {
kind: SemiColon,
span: (
26,
9,
),
},
Token {
kind: Variable(
"a",
),
span: (
27,
1,
),
},
Token {
kind: CoalesceEqual,
span: (
27,
4,
),
},
Token {
kind: LiteralInteger(
1,
),
span: (
27,
8,
),
},
Token {
kind: SemiColon,
span: (
27,
9,
),
},
]