Class: Ripper::Lexer
- Defined in:
- lib/langscan/ruby/compat/ripper/lexer.rb
Overview
:nodoc: internal use only
Constant Summary
Constants inherited from Ripper
EVENTS, PARSER_EVENTS, PARSER_EVENT_TABLE, SCANNER_EVENTS, SCANNER_EVENT_TABLE, Version
Instance Method Summary collapse
Methods inherited from Ripper
#column, #end_seen?, #initialize, lex, #lineno, parse, sexp, sexp_raw, slice, token_match, tokenize, yydebug, yydebug=
Constructor Details
This class inherits a constructor from Ripper
Instance Method Details
#lex ⇒ Object
47 48 49 |
# File 'lib/langscan/ruby/compat/ripper/lexer.rb', line 47 def lex parse().sort_by {|pos, event, tok| pos } end |
#parse ⇒ Object
51 52 53 54 55 |
# File 'lib/langscan/ruby/compat/ripper/lexer.rb', line 51 def parse @buf = [] super @buf end |
#tokenize ⇒ Object
43 44 45 |
# File 'lib/langscan/ruby/compat/ripper/lexer.rb', line 43 def tokenize lex().map {|pos, event, tok| tok } end |