Fix parsing of list type
This commit is contained in:
parent
0972822b43
commit
10224095c8
|
@ -153,9 +153,6 @@ expr = mdo
|
||||||
|
|
||||||
bexpr <- rule
|
bexpr <- rule
|
||||||
( (App <$> bexpr <*> aexpr)
|
( (App <$> bexpr <*> aexpr)
|
||||||
<|> ( List
|
|
||||||
<$> (match Lexer.OpenBracket *> bexpr <* match Lexer.CloseBracket)
|
|
||||||
)
|
|
||||||
<|> ( BoolAnd
|
<|> ( BoolAnd
|
||||||
<$> bexpr
|
<$> bexpr
|
||||||
<*> (match Lexer.And *> bexpr)
|
<*> (match Lexer.And *> bexpr)
|
||||||
|
@ -191,6 +188,9 @@ expr = mdo
|
||||||
<|> (match Lexer.Text *> pure Text)
|
<|> (match Lexer.Text *> pure Text)
|
||||||
<|> (match Lexer.ListBuild *> pure ListBuild)
|
<|> (match Lexer.ListBuild *> pure ListBuild)
|
||||||
<|> (match Lexer.ListFold *> pure ListFold)
|
<|> (match Lexer.ListFold *> pure ListFold)
|
||||||
|
<|> ( List
|
||||||
|
<$> (match Lexer.OpenBracket *> expr <* match Lexer.CloseBracket)
|
||||||
|
)
|
||||||
<|> (BoolLit <$> bool)
|
<|> (BoolLit <$> bool)
|
||||||
<|> (IntegerLit . fromIntegral <$> number)
|
<|> (IntegerLit . fromIntegral <$> number)
|
||||||
<|> (NaturalLit <$> natural)
|
<|> (NaturalLit <$> natural)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user