class Prism::LexCompat::Token
当我们在生成 token 时,我们会生成与 Ripper 相同的数组。然而,我们会在这些数组上添加几个便利方法,使它们更容易使用。我们将所有其他方法委托给数组。
Public Instance Methods
Source
# File lib/prism/lex_compat.rb, line 209 def location self[0] end
token 在源代码中的位置。
Source
# File lib/prism/lex_compat.rb, line 224 def state self[3] end
生成此 token 时 lexer 的状态。