lib/lucid-tdl/parser/lexer.rb in lucid-tdl-1.0.0 vs lib/lucid-tdl/parser/lexer.rb in lucid-tdl-1.1.0

- old
+ new

@@ -58,10 +58,13 @@ when nil case when (text = @ss.scan(/[ \t]+/)) ; + when (text = @ss.scan(/\#.*$/)) + ; + when (text = @ss.scan(/\n/)) action { [:NEWLINE, text] } when (text = @ss.scan(/Feature:/)) action { [:FEATURE, text[0..-2]] } @@ -103,10 +106,10 @@ action { [:BUT, text] } when (text = @ss.scan(/\*/)) action { [:GENERIC, text] } - when (text = @ss.scan(/[^\n]*/)) + when (text = @ss.scan(/[^#\n]*/)) action { [:TEXT, text.strip] } else text = @ss.string[@ss.pos .. -1] raise ScanError, "can not match: '" + text + "'"