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

104 lines
1.5 KiB
Plaintext

[
Token {
kind: OpenTag(
Full,
),
span: (
1,
1,
),
},
Token {
kind: Include,
span: (
3,
1,
),
},
Token {
kind: LiteralString(
"foo.php",
),
span: (
3,
9,
),
},
Token {
kind: SemiColon,
span: (
3,
18,
),
},
Token {
kind: IncludeOnce,
span: (
5,
1,
),
},
Token {
kind: LiteralString(
"bar.php",
),
span: (
5,
14,
),
},
Token {
kind: SemiColon,
span: (
5,
23,
),
},
Token {
kind: Require,
span: (
7,
1,
),
},
Token {
kind: LiteralString(
"baz.php",
),
span: (
7,
9,
),
},
Token {
kind: SemiColon,
span: (
7,
18,
),
},
Token {
kind: RequireOnce,
span: (
9,
1,
),
},
Token {
kind: LiteralString(
"qux.php",
),
span: (
9,
14,
),
},
Token {
kind: SemiColon,
span: (
9,
23,
),
},
]