summaryrefslogtreecommitdiff
path: root/eval.c
diff options
context:
space:
mode:
authorTakashi Kokubun <takashikkbn@gmail.com>2019-05-26 10:29:20 -0700
committerTakashi Kokubun <takashikkbn@gmail.com>2019-05-26 11:03:57 -0700
commit897901283c79e5f5f33656abdd453dc272268748 (patch)
tree26553a15d978079c400076ec3c6806219cf69277 /eval.c
parente73a68ebc322516a42821f502d6d5de5bfa1eb47 (diff)
Refactor IRB color dispatch
The reason why we were checking lexer state in addition to token was that we do not want to colorize local variable, method call, etc., while they share the :on_ident token with a name of method definition which should be colored as blue. It means that we're concerned about the lexer state only for :on_ident. Thus we can skip checking lexer state for non-:on_ident tokens. This refactoring is based on that idea. Also, now we manage Ripper's lexer state as Integer (use `|` if you need to check multiple states). It should be faster than using Array of Integer because #any? block call is not needed.
Diffstat (limited to 'eval.c')
0 files changed, 0 insertions, 0 deletions