diff options
author | Malte Voos <git@mal.tc> | 2024-02-20 14:00:27 +0100 |
---|---|---|
committer | Malte Voos <git@mal.tc> | 2024-02-20 14:00:27 +0100 |
commit | 4b2a72d01b48b9e5fd4743b98b0c6bf6422cfc0c (patch) | |
tree | cddb4b01dec26679ecdbb190286ac45fed78161a /lib/Parser.mly | |
parent | 5252fe93e5e7ef77888c06c97de4e350dce90448 (diff) | |
download | toytt-4b2a72d01b48b9e5fd4743b98b0c6bf6422cfc0c.tar.gz toytt-4b2a72d01b48b9e5fd4743b98b0c6bf6422cfc0c.zip |
use yuujinchou for identifiers
Diffstat (limited to 'lib/Parser.mly')
-rw-r--r-- | lib/Parser.mly | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/Parser.mly b/lib/Parser.mly index d0395ac..0390b3c 100644 --- a/lib/Parser.mly +++ b/lib/Parser.mly @@ -21,8 +21,10 @@ open Ast %inline locate(X): e = X { Asai.Range.locate_lex $loc e } +raw_ident: id = separated_nonempty_list(DOT, IDENT) { id } + %inline -ident: id = locate(IDENT) { id } +ident: id = locate(raw_ident) { id } raw_arg: LPR; name = ident; COLON; ty = expr; RPR { { name; ty } } @@ -31,7 +33,7 @@ raw_arg: LPR; name = ident; COLON; ty = expr; RPR arg: a = locate(raw_arg) { a } raw_expr: - | name = IDENT + | name = raw_ident { Var name } | LPR; e = raw_expr; RPR { e } |