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.



1408
1409
1410
# File 'lib/ruby_parser_extras.rb', line 1408

def lineno
  @lineno
end

Instance Method Details

#grep(re) ⇒ Object



1395
1396
1397
# File 'lib/ruby_parser_extras.rb', line 1395

def grep re
  lines.grep re
end