Added comment removal
This commit is contained in:
parent
5c8c7dd152
commit
3453bc7bab
1 changed files with 5 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue