Class: CTokenizer::Splitter
- Defined in:
- lib/dbc/ctokenizer.rb
Overview
writes tokens to some output source may not be useful…
Instance Method Summary collapse
-
#initialize(out, source, file = nil, line = 1) ⇒ Splitter
constructor
A new instance of Splitter.
- #shift ⇒ Object
Methods inherited from LexerBase
#empty?, #file, #line, #peek_nonspace
Methods included from CTokenizer
check_string, check_token, #collect, create_newlines, #each, error, #error, join, line_count, #parse_error, split, split_token, #to_a, #token_error, #warning, whitespace?
Constructor Details
#initialize(out, source, file = nil, line = 1) ⇒ Splitter
Returns a new instance of Splitter.
319 320 321 322 |
# File 'lib/dbc/ctokenizer.rb', line 319 def initialize(out, source, file=nil, line=1) super(source, file, line) @out = out end |
Instance Method Details
#shift ⇒ Object
324 325 326 327 328 |
# File 'lib/dbc/ctokenizer.rb', line 324 def shift t = super @out << t t end |