Loading lexer.rb +1 −1 Original line number Diff line number Diff line Loading @@ -49,7 +49,7 @@ module JsDuck elsif @input.check(/\/\*\*/) then @tokens << { :type => :doc_comment, :value => @input.scan_until(/\*\//) :value => @input.scan_until(/\*\/|\Z/) } elsif @input.check(/"/) then @tokens << { Loading tc_lexer.rb +2 −1 Original line number Diff line number Diff line Loading @@ -50,9 +50,10 @@ class TestLexer < Test::Unit::TestCase assert_tokens("a /* foo */ b", [[:ident, "a"], [:ident, "b"]]) end def test_comments_until_file_end def test_tokens_until_file_end assert_tokens("// ", []) assert_tokens("/* ", []) assert_tokens("/** ", [[:doc_comment, "/** "]]) end def test_doc_comment Loading Loading
lexer.rb +1 −1 Original line number Diff line number Diff line Loading @@ -49,7 +49,7 @@ module JsDuck elsif @input.check(/\/\*\*/) then @tokens << { :type => :doc_comment, :value => @input.scan_until(/\*\//) :value => @input.scan_until(/\*\/|\Z/) } elsif @input.check(/"/) then @tokens << { Loading
tc_lexer.rb +2 −1 Original line number Diff line number Diff line Loading @@ -50,9 +50,10 @@ class TestLexer < Test::Unit::TestCase assert_tokens("a /* foo */ b", [[:ident, "a"], [:ident, "b"]]) end def test_comments_until_file_end def test_tokens_until_file_end assert_tokens("// ", []) assert_tokens("/* ", []) assert_tokens("/** ", [[:doc_comment, "/** "]]) end def test_doc_comment Loading