diff options
author | Aleksey Kladov <[email protected]> | 2017-12-30 17:56:54 +0000 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2017-12-30 17:56:54 +0000 |
commit | 492f6e6b1c8d062c6732f9aa3360c14708bb1452 (patch) | |
tree | 41a8e09a61ac6b49fd6b21a235fa1c27f44b4129 /src | |
parent | 412948c0e2f34b1db13201bf533468241ee881e6 (diff) |
Lexer: angle brackets
Diffstat (limited to 'src')
-rw-r--r-- | src/lexer/mod.rs | 2 | ||||
-rw-r--r-- | src/syntax_kinds.rs | 30 |
2 files changed, 19 insertions, 13 deletions
diff --git a/src/lexer/mod.rs b/src/lexer/mod.rs index 5255c3d56..24c14add0 100644 --- a/src/lexer/mod.rs +++ b/src/lexer/mod.rs | |||
@@ -47,6 +47,8 @@ fn next_token_inner(c: char, ptr: &mut Ptr) -> SyntaxKind { | |||
47 | '}' => return R_CURLY, | 47 | '}' => return R_CURLY, |
48 | '[' => return L_BRACK, | 48 | '[' => return L_BRACK, |
49 | ']' => return R_BRACK, | 49 | ']' => return R_BRACK, |
50 | '<' => return L_ANGLE, | ||
51 | '>' => return R_ANGLE, | ||
50 | '@' => return AT, | 52 | '@' => return AT, |
51 | '#' => return POUND, | 53 | '#' => return POUND, |
52 | '~' => return TILDE, | 54 | '~' => return TILDE, |
diff --git a/src/syntax_kinds.rs b/src/syntax_kinds.rs index a922056ce..040ac1257 100644 --- a/src/syntax_kinds.rs +++ b/src/syntax_kinds.rs | |||
@@ -19,20 +19,22 @@ pub const L_CURLY: SyntaxKind = SyntaxKind(14); | |||
19 | pub const R_CURLY: SyntaxKind = SyntaxKind(15); | 19 | pub const R_CURLY: SyntaxKind = SyntaxKind(15); |
20 | pub const L_BRACK: SyntaxKind = SyntaxKind(16); | 20 | pub const L_BRACK: SyntaxKind = SyntaxKind(16); |
21 | pub const R_BRACK: SyntaxKind = SyntaxKind(17); | 21 | pub const R_BRACK: SyntaxKind = SyntaxKind(17); |
22 | pub const AT: SyntaxKind = SyntaxKind(18); | 22 | pub const L_ANGLE: SyntaxKind = SyntaxKind(18); |
23 | pub const POUND: SyntaxKind = SyntaxKind(19); | 23 | pub const R_ANGLE: SyntaxKind = SyntaxKind(19); |
24 | pub const TILDE: SyntaxKind = SyntaxKind(20); | 24 | pub const AT: SyntaxKind = SyntaxKind(20); |
25 | pub const QUESTION: SyntaxKind = SyntaxKind(21); | 25 | pub const POUND: SyntaxKind = SyntaxKind(21); |
26 | pub const COLON: SyntaxKind = SyntaxKind(22); | 26 | pub const TILDE: SyntaxKind = SyntaxKind(22); |
27 | pub const COLONCOLON: SyntaxKind = SyntaxKind(23); | 27 | pub const QUESTION: SyntaxKind = SyntaxKind(23); |
28 | pub const DOLLAR: SyntaxKind = SyntaxKind(24); | 28 | pub const COLON: SyntaxKind = SyntaxKind(24); |
29 | pub const EQ: SyntaxKind = SyntaxKind(25); | 29 | pub const COLONCOLON: SyntaxKind = SyntaxKind(25); |
30 | pub const EQEQ: SyntaxKind = SyntaxKind(26); | 30 | pub const DOLLAR: SyntaxKind = SyntaxKind(26); |
31 | pub const FAT_ARROW: SyntaxKind = SyntaxKind(27); | 31 | pub const EQ: SyntaxKind = SyntaxKind(27); |
32 | pub const NEQ: SyntaxKind = SyntaxKind(28); | 32 | pub const EQEQ: SyntaxKind = SyntaxKind(28); |
33 | pub const NOT: SyntaxKind = SyntaxKind(29); | 33 | pub const FAT_ARROW: SyntaxKind = SyntaxKind(29); |
34 | pub const NEQ: SyntaxKind = SyntaxKind(30); | ||
35 | pub const NOT: SyntaxKind = SyntaxKind(31); | ||
34 | 36 | ||
35 | static INFOS: [SyntaxInfo; 30] = [ | 37 | static INFOS: [SyntaxInfo; 32] = [ |
36 | SyntaxInfo { name: "ERROR" }, | 38 | SyntaxInfo { name: "ERROR" }, |
37 | SyntaxInfo { name: "IDENT" }, | 39 | SyntaxInfo { name: "IDENT" }, |
38 | SyntaxInfo { name: "UNDERSCORE" }, | 40 | SyntaxInfo { name: "UNDERSCORE" }, |
@@ -51,6 +53,8 @@ static INFOS: [SyntaxInfo; 30] = [ | |||
51 | SyntaxInfo { name: "R_CURLY" }, | 53 | SyntaxInfo { name: "R_CURLY" }, |
52 | SyntaxInfo { name: "L_BRACK" }, | 54 | SyntaxInfo { name: "L_BRACK" }, |
53 | SyntaxInfo { name: "R_BRACK" }, | 55 | SyntaxInfo { name: "R_BRACK" }, |
56 | SyntaxInfo { name: "L_ANGLE" }, | ||
57 | SyntaxInfo { name: "R_ANGLE" }, | ||
54 | SyntaxInfo { name: "AT" }, | 58 | SyntaxInfo { name: "AT" }, |
55 | SyntaxInfo { name: "POUND" }, | 59 | SyntaxInfo { name: "POUND" }, |
56 | SyntaxInfo { name: "TILDE" }, | 60 | SyntaxInfo { name: "TILDE" }, |