diff --git a/src/Insect/Parser.purs b/src/Insect/Parser.purs index ff28d3c..a2472bd 100644 --- a/src/Insect/Parser.purs +++ b/src/Insect/Parser.purs @@ -418,6 +418,7 @@ assignment = do var ← token.identifier reservedOp "=" value ← expression + eof pure $ Tuple var value -- | Try to parse the identifier as a unit, and fail if it succeeds. diff --git a/test/Main.purs b/test/Main.purs index 89ca3f4..b8e97c0 100644 --- a/test/Main.purs +++ b/test/Main.purs @@ -575,6 +575,7 @@ main = runTest do shouldFail "x+2=3" shouldFail "3=5" shouldFail "x=" + shouldFail "x=3+" test "Reserved names" do shouldFail "m=2" -- 'm' is reserved unit