From f3d0e4ebb60db41f15bb3119d23402a8a0516384 Mon Sep 17 00:00:00 2001 From: Eleanor Walker Date: Sat, 14 Dec 2024 19:28:22 -0500 Subject: [PATCH] Fixed parse of comment on last line --- src/HVML/Parse.hs | 2 +- test.hvml | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) create mode 100644 test.hvml diff --git a/src/HVML/Parse.hs b/src/HVML/Parse.hs index b53d4a6..b4891eb 100644 --- a/src/HVML/Parse.hs +++ b/src/HVML/Parse.hs @@ -441,7 +441,7 @@ skip = skipMany (parseSpace <|> parseComment) where parseComment = (try $ do string "//" skipMany (noneOf "\n") - char '\n' + (char '\n' <|> eof) return ()) "Comment" genFreshLabel :: ParserM Word64 diff --git a/test.hvml b/test.hvml new file mode 100644 index 0000000..c427651 --- /dev/null +++ b/test.hvml @@ -0,0 +1,2 @@ +@main = 3 +//