Fix record dot syntax parser.

This commit is contained in:
Matus Tejiscak 2020-04-17 00:35:39 +02:00
parent ca1ef8a882
commit 4b986e8b61

View File

@ -314,7 +314,7 @@ mutual
simpleExpr fname indents = simpleExpr fname indents =
do do
start <- location start <- location
recFields <- many recField recFields <- some recField
end <- location end <- location
pure $ PRecordProjection (MkFC fname start end) recFields pure $ PRecordProjection (MkFC fname start end) recFields
<|> do <|> do
@ -322,7 +322,7 @@ mutual
root <- simplerExpr fname indents root <- simplerExpr fname indents
recFields <- many recField recFields <- many recField
end <- location end <- location
case recFields of pure $ case recFields of
[] => root [] => root
fs => PRecordFieldAccess (MkFC fname start end) root recFields fs => PRecordFieldAccess (MkFC fname start end) root recFields