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 20af2f6 commit 1f72f37Copy full SHA for 1f72f37
lib/rdoc/ruby_lex.rb
@@ -737,6 +737,7 @@ def lex_int2
737
738
@OP.def_rule("[") do
739
|op, io|
740
+ text = nil
741
@indent += 1
742
if @lex_state == :EXPR_FNAME
743
tk_c = TkfLBRACK
@@ -745,13 +746,25 @@ def lex_int2
745
746
tk_c = TkLBRACK
747
elsif @lex_state == :EXPR_ARG && @space_seen
748
749
+ elsif @lex_state == :EXPR_DOT
750
+ if peek(0) == "]"
751
+ tk_c = TkIDENTIFIER
752
+ getc
753
+ if peek(0) == "="
754
+ text = "[]="
755
+ else
756
+ text = "[]"
757
+ end
758
759
+ tk_c = TkOp
760
761
else
762
763
end
764
@lex_state = :EXPR_BEG
765
766
@indent_stack.push tk_c
- Token(tk_c)
767
+ Token(tk_c, text)
768
769
770
@OP.def_rule("{") do
0 commit comments