Class: String

Inherits:
Object
  • Object
show all
Defined in:
lib/ruby_parser_extras.rb,
lib/ruby_parser_extras.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#linenoObject

This is a hack used by the lexer to sneak in line numbers at the identifier level. This should be MUCH smaller than making process_token return [value, lineno] and modifying EVERYTHING that reduces tIDENTIFIER.



1417
1418
1419
# File 'lib/ruby_parser_extras.rb', line 1417

def lineno
  @lineno
end

Instance Method Details

#grep(re) ⇒ Object



1404
1405
1406
# File 'lib/ruby_parser_extras.rb', line 1404

def grep re
  lines.grep re
end