Skip to content

Commit 76dbba1

Browse files
committed
Fix lexing of '.%\n' - make sure correct lexer state is set
1 parent e560a41 commit 76dbba1

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lib/opal/lexer.rb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -570,7 +570,9 @@ def next_token
570570
return :STRING_BEG, scanner.matched
571571
end
572572
end
573-
@lex_state = @lex_state == :expr_fname ? :expr_end : :expr_beg
573+
574+
@lex_state = after_operator? ? :expr_arg : :expr_beg
575+
574576
return '%', '%'
575577

576578
elsif scanner.scan(/\\/)

0 commit comments

Comments
 (0)