Class: Ripper::Lexer
Overview
:nodoc: internal use only
Constant Summary
Constants inherited from Ripper
EVENTS, PARSER_EVENTS, SCANNER_EVENTS
Instance Method Summary collapse
Methods inherited from Ripper
lex, parse, sexp, sexp_raw, slice, token_match, tokenize
Instance Method Details
#lex ⇒ Object
47 48 49 |
# File 'lib/ripper/lexer.rb', line 47 def lex parse().sort_by {|pos, event, tok| pos } end |
#parse ⇒ Object
51 52 53 54 55 |
# File 'lib/ripper/lexer.rb', line 51 def parse @buf = [] super @buf end |
#tokenize ⇒ Object
43 44 45 |
# File 'lib/ripper/lexer.rb', line 43 def tokenize lex().map {|pos, event, tok| tok } end |