Skip to content

Commit 6bab5ad

Browse files
committed
- Fixed symbols with no spaces in method calls (e.g. foo:bar) (YAY! brynary)
[git-p4: depot-paths = "//src/ruby_parser/dev/": change = 6742]
1 parent 18c757e commit 6bab5ad

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

lib/ruby_lexer.rb

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -708,7 +708,6 @@ def yylex # 826 lines
708708
end
709709
elsif src.scan(/\(/) then
710710
result = :tLPAREN2
711-
self.command_start = true
712711

713712
if lex_state == :expr_beg || lex_state == :expr_mid then
714713
result = :tLPAREN
@@ -1265,7 +1264,7 @@ def process_token(command_state)
12651264
end
12661265
end
12671266

1268-
if lex_state == :expr_beg || lex_state == :expr_arg || lex_state == :expr_cmdarg
1267+
if (lex_state == :expr_beg && !command_state) || lex_state == :expr_arg || lex_state == :expr_cmdarg
12691268
colon = src.scan(/:/)
12701269

12711270
if colon && src.peek(1) != ":"

0 commit comments

Comments
 (0)