We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4fcbe6b commit a2c9282Copy full SHA for a2c9282
test/test_rdoc_ruby_lex.rb
@@ -927,6 +927,22 @@ def test_class_tokenize_symbol
927
assert_equal expected, tokens
928
end
929
930
+ def test_class_tokenize_symbol_for_method
931
+ tokens = RDoc::RubyLex.tokenize 'meth("key": :val)', nil
932
+
933
+ expected = [
934
+ @TK::TkIDENTIFIER.new( 0, 1, 0, 'meth'),
935
+ @TK::TkLPAREN .new( 4, 1, 4, '('),
936
+ @TK::TkSYMBOL .new( 5, 1, 5, '"key":'),
937
+ @TK::TkSPACE .new(11, 1, 11, ' '),
938
+ @TK::TkSYMBOL .new(12, 1, 12, ':val'),
939
+ @TK::TkRPAREN .new(16, 1, 16, ')'),
940
+ @TK::TkNL .new(17, 1, 17, "\n"),
941
+ ]
942
943
+ assert_equal expected, tokens
944
+ end
945
946
def test_class_tokenize_particular_kind_of_symbols
947
tokens = RDoc::RubyLex.tokenize '{ Thomas: :Thomas, Dave!: :Dave!, undef: :undef }', nil
948
0 commit comments