Added comment removal

This commit is contained in:
Dominic Grimm 2021-10-19 17:26:49 +02:00
parent 5c8c7dd152
commit 3453bc7bab
1 changed files with 5 additions and 1 deletions

View File

@ -65,7 +65,11 @@ module Sexpr
end
end
def remove_comments(source : String) : String
source.gsub(/;;?.+/, nil)
end
def parse(source : String) : Body
Wrapper.new(source).parse
Wrapper.new(remove_comments(source)).parse
end
end