about summary refs log tree commit diff
path: root/src/parser
diff options
context:
space:
mode:
authorMalte Voos <git@mal.tc>2024-07-09 00:18:52 +0200
committerMalte Voos <git@mal.tc>2024-07-09 00:18:52 +0200
commit91ae576296df72defa2bb9369ac1cfe719f6f9cf (patch)
treee0bb1fa34b968a0171f2ad57832322dd6cece3e8 /src/parser
parent3cf472b13c9b329b711a5c254fc6f89268a99eda (diff)
downloadtoytt-main.tar.gz
toytt-main.zip
rename Ident -> Name part 2 main
Diffstat (limited to 'src/parser')
-rw-r--r--src/parser/Grammar.mly8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/parser/Grammar.mly b/src/parser/Grammar.mly
index 5e4886e..64f540d 100644
--- a/src/parser/Grammar.mly
+++ b/src/parser/Grammar.mly
@@ -25,10 +25,10 @@ open Ast
 %inline
 locate(X): e = X { Asai.Range.locate_lex ~source:(Eff.read()) $loc e }
 
-raw_ident: id = separated_nonempty_list(DOT, IDENT) { id }
+raw_name: id = separated_nonempty_list(DOT, IDENT) { id }
 
 %inline
-ident: id = locate(raw_ident) { id }
+name: name = locate(raw_name) { name }
 
 raw_local_name:
   | name = IDENT { Some name }
@@ -40,7 +40,7 @@ arg: LPR; name = local_name; COLON; tp = expr; RPR
 	{ (name, tp) }
 
 raw_expr:
-  | name = raw_ident
+  | name = raw_name
 	{ Var name }
   | LPR; e = raw_expr; RPR
 	{ e }
@@ -84,7 +84,7 @@ raw_expr:
 expr: e = locate(raw_expr) { e }
 
 item:
-  | DEF; name = ident; args = list(arg); COLON; tp = expr; ASSIGN; tm = expr
+  | DEF; name = name; args = list(arg); COLON; tp = expr; ASSIGN; tm = expr
     { Def { name; args; tp; tm } }
 
 file: items = list(item) { items }