- permit comments to have no content following them.

This commit is contained in:
Jordan Sissel 2013-06-18 18:39:11 -07:00
parent b3e64b5907
commit d1fff7536d
2 changed files with 2 additions and 7 deletions

View file

@ -152,12 +152,7 @@ module LogStashConfig
break
end
end
if s5.empty?
@index = i5
r5 = nil
else
r5 = instantiate_node(SyntaxNode,input, i5...index, s5)
end
r5 = instantiate_node(SyntaxNode,input, i5...index, s5)
s1 << r5
if r5
if has_terminal?("\r", false, index)

View file

@ -7,7 +7,7 @@ grammar LogStashConfig
end
rule comment
(whitespace? "#" [^\r\n]+ "\r"? "\n")+ <LogStash::Config::AST::Comment>
(whitespace? "#" [^\r\n]* "\r"? "\n")+ <LogStash::Config::AST::Comment>
end
rule _