From 4b2a72d01b48b9e5fd4743b98b0c6bf6422cfc0c Mon Sep 17 00:00:00 2001 From: Malte Voos Date: Tue, 20 Feb 2024 14:00:27 +0100 Subject: use yuujinchou for identifiers --- lib/Parser.mly | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'lib/Parser.mly') 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 } -- cgit 1.4.1