Method: Prism.lex

Defined in:
lib/prism/ffi.rb,
ext/prism/extension.c

.Prism::lex(source, **options) ⇒ LexResult

Return a LexResult instance that contains an array of Token instances corresponding to the given string. For supported options, see Prism::parse.

Returns:



214
215
216
# File 'lib/prism/ffi.rb', line 214

def lex(code, **options)
  LibRubyParser::PrismString.with_string(code) { |string| lex_common(string, code, options) }
end