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

396 lines
5.6 KiB
Plaintext

[
Token {
kind: OpenTag(
Full,
),
span: (
1,
1,
),
},
Token {
kind: Variable(
"a",
),
span: (
3,
1,
),
},
Token {
kind: Equals,
span: (
3,
4,
),
},
Token {
kind: LiteralInteger(
2,
),
span: (
3,
6,
),
},
Token {
kind: Pow,
span: (
3,
8,
),
},
Token {
kind: LiteralInteger(
2,
),
span: (
3,
11,
),
},
Token {
kind: SemiColon,
span: (
3,
12,
),
},
Token {
kind: Variable(
"b",
),
span: (
5,
1,
),
},
Token {
kind: Equals,
span: (
5,
4,
),
},
Token {
kind: LiteralInteger(
1,
),
span: (
5,
6,
),
},
Token {
kind: Question,
span: (
5,
8,
),
},
Token {
kind: LiteralInteger(
2,
),
span: (
5,
10,
),
},
Token {
kind: Colon,
span: (
5,
12,
),
},
Token {
kind: LiteralInteger(
3,
),
span: (
5,
14,
),
},
Token {
kind: SemiColon,
span: (
5,
15,
),
},
Token {
kind: Variable(
"c",
),
span: (
7,
1,
),
},
Token {
kind: Equals,
span: (
7,
4,
),
},
Token {
kind: LiteralInteger(
1,
),
span: (
7,
6,
),
},
Token {
kind: Question,
span: (
7,
8,
),
},
Token {
kind: LiteralInteger(
2,
),
span: (
7,
10,
),
},
Token {
kind: Question,
span: (
7,
12,
),
},
Token {
kind: LiteralInteger(
3,
),
span: (
7,
14,
),
},
Token {
kind: Colon,
span: (
7,
16,
),
},
Token {
kind: LiteralInteger(
4,
),
span: (
7,
18,
),
},
Token {
kind: Colon,
span: (
7,
20,
),
},
Token {
kind: LiteralInteger(
5,
),
span: (
7,
22,
),
},
Token {
kind: SemiColon,
span: (
7,
23,
),
},
Token {
kind: Variable(
"d",
),
span: (
9,
1,
),
},
Token {
kind: Equals,
span: (
9,
4,
),
},
Token {
kind: LiteralInteger(
1,
),
span: (
9,
6,
),
},
Token {
kind: QuestionColon,
span: (
9,
8,
),
},
Token {
kind: LiteralInteger(
2,
),
span: (
9,
11,
),
},
Token {
kind: QuestionColon,
span: (
9,
13,
),
},
Token {
kind: LiteralInteger(
3,
),
span: (
9,
16,
),
},
Token {
kind: SemiColon,
span: (
9,
17,
),
},
Token {
kind: Variable(
"e",
),
span: (
11,
1,
),
},
Token {
kind: Equals,
span: (
11,
4,
),
},
Token {
kind: LiteralInteger(
1,
),
span: (
11,
6,
),
},
Token {
kind: Coalesce,
span: (
11,
8,
),
},
Token {
kind: LiteralInteger(
2,
),
span: (
11,
11,
),
},
Token {
kind: SemiColon,
span: (
11,
12,
),
},
Token {
kind: Variable(
"f",
),
span: (
13,
1,
),
},
Token {
kind: Equals,
span: (
13,
4,
),
},
Token {
kind: LiteralInteger(
1,
),
span: (
13,
6,
),
},
Token {
kind: Coalesce,
span: (
13,
8,
),
},
Token {
kind: LiteralInteger(
2,
),
span: (
13,
11,
),
},
Token {
kind: Coalesce,
span: (
13,
13,
),
},
Token {
kind: LiteralInteger(
3,
),
span: (
13,
16,
),
},
Token {
kind: SemiColon,
span: (
13,
17,
),
},
]