aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_syntax/src/grammar.ron
diff options
context:
space:
mode:
authorMarcus Klaas de Vries <[email protected]>2019-01-11 10:27:07 +0000
committerMarcus Klaas de Vries <[email protected]>2019-01-14 12:56:43 +0000
commit606d66a714bb8fe07f35a6af83d04ab576b9a0e1 (patch)
treedd69d9e6484d7a67d8545ef10ec736c24d90849e /crates/ra_syntax/src/grammar.ron
parent81bc8e4973fefd0ff31d08206c374fb58aa8b6e0 (diff)
Start moving literal interpretation to the AST (WIP)
Diffstat (limited to 'crates/ra_syntax/src/grammar.ron')
-rw-r--r--crates/ra_syntax/src/grammar.ron18
1 files changed, 16 insertions, 2 deletions
diff --git a/crates/ra_syntax/src/grammar.ron b/crates/ra_syntax/src/grammar.ron
index dfd88bd10..49b297696 100644
--- a/crates/ra_syntax/src/grammar.ron
+++ b/crates/ra_syntax/src/grammar.ron
@@ -215,6 +215,7 @@ Grammar(
215 "PATH", 215 "PATH",
216 "PATH_SEGMENT", 216 "PATH_SEGMENT",
217 "LITERAL", 217 "LITERAL",
218 "LITERAL_EXPR",
218 "ALIAS", 219 "ALIAS",
219 "VISIBILITY", 220 "VISIBILITY",
220 "WHERE_CLAUSE", 221 "WHERE_CLAUSE",
@@ -426,11 +427,24 @@ Grammar(
426 "PrefixExpr": (options: ["Expr"]), 427 "PrefixExpr": (options: ["Expr"]),
427 "RangeExpr": (), 428 "RangeExpr": (),
428 "BinExpr": (), 429 "BinExpr": (),
430
431 "IntNumber": ( traits: ["AstToken"] ),
432 "FloatNumber": ( traits: ["AstToken"] ),
429 "String": ( traits: ["AstToken"] ), 433 "String": ( traits: ["AstToken"] ),
430 "Byte": ( traits: ["AstToken"] ), 434 "Byte": ( traits: ["AstToken"] ),
431 "ByteString": ( traits: ["AstToken"] ), 435 "ByteString": ( traits: ["AstToken"] ),
432 "Char": ( traits: ["AstToken"] ), 436 "Char": ( traits: ["AstToken"] ),
433 "Literal": (), 437 "Literal": (
438 enum: [
439 "String",
440 "ByteString",
441 "Char",
442 "Byte",
443 "IntNumber",
444 "FloatNumber",
445 ]
446 ),
447 "LiteralExpr": (options: ["Literal"]),
434 448
435 "Expr": ( 449 "Expr": (
436 enum: [ 450 enum: [
@@ -460,7 +474,7 @@ Grammar(
460 "PrefixExpr", 474 "PrefixExpr",
461 "RangeExpr", 475 "RangeExpr",
462 "BinExpr", 476 "BinExpr",
463 "Literal", 477 "LiteralExpr",
464 ], 478 ],
465 ), 479 ),
466 480