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

231 lines
3.2 KiB
Plaintext

[
Token {
kind: OpenTag(
Full,
),
span: (
1,
1,
),
},
Token {
kind: Declare,
span: (
3,
1,
),
},
Token {
kind: LeftParen,
span: (
3,
8,
),
},
Token {
kind: Identifier(
"a",
),
span: (
3,
9,
),
},
Token {
kind: Equals,
span: (
3,
10,
),
},
Token {
kind: LiteralInteger(
1,
),
span: (
3,
11,
),
},
Token {
kind: RightParen,
span: (
3,
12,
),
},
Token {
kind: Colon,
span: (
3,
13,
),
},
Token {
kind: Variable(
"a",
),
span: (
4,
5,
),
},
Token {
kind: SemiColon,
span: (
4,
7,
),
},
Token {
kind: EndDeclare,
span: (
5,
1,
),
},
Token {
kind: SemiColon,
span: (
5,
11,
),
},
Token {
kind: Declare,
span: (
7,
1,
),
},
Token {
kind: LeftParen,
span: (
7,
8,
),
},
Token {
kind: Identifier(
"b",
),
span: (
7,
9,
),
},
Token {
kind: Equals,
span: (
7,
10,
),
},
Token {
kind: LiteralString(
"9",
),
span: (
7,
11,
),
},
Token {
kind: RightParen,
span: (
7,
14,
),
},
Token {
kind: Colon,
span: (
7,
15,
),
},
Token {
kind: Variable(
"a",
),
span: (
8,
5,
),
},
Token {
kind: SemiColon,
span: (
8,
7,
),
},
Token {
kind: EndDeclare,
span: (
9,
1,
),
},
Token {
kind: SemiColon,
span: (
9,
11,
),
},
Token {
kind: Declare,
span: (
11,
1,
),
},
Token {
kind: LeftParen,
span: (
11,
8,
),
},
Token {
kind: Identifier(
"foo",
),
span: (
11,
9,
),
},
Token {
kind: Equals,
span: (
11,
12,
),
},
Token {
kind: LiteralFloat(
1.42,
),
span: (
11,
13,
),
},
Token {
kind: RightParen,
span: (
11,
17,
),
},
Token {
kind: SemiColon,
span: (
11,
18,
),
},
]