mirror of
https://github.com/danog/parser.git
synced 2024-11-26 20:04:57 +01:00
ac42958b4f
- 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
139 lines
1.9 KiB
Plaintext
139 lines
1.9 KiB
Plaintext
[
|
|
Token {
|
|
kind: OpenTag(
|
|
Full,
|
|
),
|
|
span: (
|
|
1,
|
|
1,
|
|
),
|
|
},
|
|
Token {
|
|
kind: Class,
|
|
span: (
|
|
3,
|
|
1,
|
|
),
|
|
},
|
|
Token {
|
|
kind: Identifier(
|
|
"foo",
|
|
),
|
|
span: (
|
|
3,
|
|
7,
|
|
),
|
|
},
|
|
Token {
|
|
kind: LeftBrace,
|
|
span: (
|
|
3,
|
|
11,
|
|
),
|
|
},
|
|
Token {
|
|
kind: Public,
|
|
span: (
|
|
4,
|
|
5,
|
|
),
|
|
},
|
|
Token {
|
|
kind: Function,
|
|
span: (
|
|
4,
|
|
12,
|
|
),
|
|
},
|
|
Token {
|
|
kind: Identifier(
|
|
"__construct",
|
|
),
|
|
span: (
|
|
4,
|
|
21,
|
|
),
|
|
},
|
|
Token {
|
|
kind: LeftParen,
|
|
span: (
|
|
4,
|
|
32,
|
|
),
|
|
},
|
|
Token {
|
|
kind: Readonly,
|
|
span: (
|
|
5,
|
|
9,
|
|
),
|
|
},
|
|
Token {
|
|
kind: Public,
|
|
span: (
|
|
5,
|
|
18,
|
|
),
|
|
},
|
|
Token {
|
|
kind: Variable(
|
|
"s",
|
|
),
|
|
span: (
|
|
5,
|
|
25,
|
|
),
|
|
},
|
|
Token {
|
|
kind: Equals,
|
|
span: (
|
|
5,
|
|
28,
|
|
),
|
|
},
|
|
Token {
|
|
kind: LiteralString(
|
|
"h",
|
|
),
|
|
span: (
|
|
5,
|
|
30,
|
|
),
|
|
},
|
|
Token {
|
|
kind: Comma,
|
|
span: (
|
|
5,
|
|
33,
|
|
),
|
|
},
|
|
Token {
|
|
kind: RightParen,
|
|
span: (
|
|
6,
|
|
5,
|
|
),
|
|
},
|
|
Token {
|
|
kind: LeftBrace,
|
|
span: (
|
|
6,
|
|
7,
|
|
),
|
|
},
|
|
Token {
|
|
kind: RightBrace,
|
|
span: (
|
|
6,
|
|
8,
|
|
),
|
|
},
|
|
Token {
|
|
kind: RightBrace,
|
|
span: (
|
|
7,
|
|
1,
|
|
),
|
|
},
|
|
]
|