Method: ANTLR3::StringStream#consume
- Defined in:
- lib/antlr3/streams.rb
#consume ⇒ Object
advance the stream by one character; returns the character consumed
478 479 480 481 482 483 484 485 486 487 488 489 |
# File 'lib/antlr3/streams.rb', line 478 def consume c = @data[ @position ] || EOF if @position < @data.length @column += 1 if c == NEWLINE @line += 1 @column = 0 end @position += 1 end return( c ) end |