summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoraarneranta <aarne@chalmers.se>2022-10-03 17:04:29 +0200
committeraarneranta <aarne@chalmers.se>2022-10-03 17:04:29 +0200
commit83483b93bac1dd63bc2d8c52341aa0a8bfbb267e (patch)
treead80e64233a74fd5f40e3342b46a01b971fdd2e5
parentdc8dce90a034db82dee913ceeb1ea46034211b64 (diff)
New construct: table update. Syntax t ** { cases }. Syntactic sugar for table {cases ; vvv => t \! vvv}.t
-rw-r--r--src/compiler/GF/Grammar/Parser.y1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/compiler/GF/Grammar/Parser.y b/src/compiler/GF/Grammar/Parser.y
index da96f9265..7837ec015 100644
--- a/src/compiler/GF/Grammar/Parser.y
+++ b/src/compiler/GF/Grammar/Parser.y
@@ -430,6 +430,7 @@ Exp3
RecType xs -> RecType (xs ++ [(tupleLabel (length xs+1),$3)])
t -> RecType [(tupleLabel 1,$1), (tupleLabel 2,$3)] }
| Exp3 '**' Exp4 { ExtR $1 $3 }
+ | Exp3 '**' '{' ListCase '}' { let v = identS "vvv" in T TRaw ($4 ++ [(PV v, S $1 (Vr v))]) }
| Exp4 { $1 }
Exp4 :: { Term }