1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

Check code_block_open for whether code continues

This commit is contained in:
aycabta 2019-07-03 23:37:46 +09:00
parent 6bd49b33c8
commit 7b9bb6f44a

View file

@ -47,8 +47,8 @@ class RubyLex
result = []
lines.each_index { |i|
c = lines[0..i].map{ |l| l + "\n" }.join
ltype, indent, continue, = check_state(c)
result << @prompt.call(ltype, indent, continue, @line_no + i)
ltype, indent, continue, code_block_open = check_state(c)
result << @prompt.call(ltype, indent, continue || code_block_open, @line_no + i)
}
result
end