Add comment styles, don't choke on #!/usr/bin/env foo=bar...

This commit is contained in:
Geoff Nixon
2014-10-17 04:42:51 -07:00
parent e8cf750e18
commit edadca9085
6 changed files with 1520 additions and 0 deletions

View File

@@ -37,6 +37,8 @@ class TestTokenizer < Test::Unit::TestCase
assert_equal %w(foo), tokenize("foo\n# Comment")
assert_equal %w(foo bar), tokenize("foo\n# Comment\nbar")
assert_equal %w(foo), tokenize("foo\n// Comment")
assert_equal %w(foo), tokenize("foo\n-- Comment")
assert_equal %w(foo), tokenize("foo\n\" Comment")
assert_equal %w(foo), tokenize("foo /* Comment */")
assert_equal %w(foo), tokenize("foo /* \nComment\n */")
assert_equal %w(foo), tokenize("foo <!-- Comment -->")