Class: CTokenizer::Splitter
- Defined in:
- lib/dbc/ctokenizer.rb
Overview
writes tokens to some output source may not be useful…
Constant Summary
Constants included from CTokenizer
Instance Attribute Summary
Attributes inherited from LexerBase
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, #match?, #post_match, #scan
Methods included from CTokenizer
check_token, #collect, #each, #error, error, line_count, #parse_error, #to_a, #token_error, #warning, whitespace?
Constructor Details
#initialize(out, source, file = nil, line = 1) ⇒ Splitter
Returns a new instance of Splitter.
310 311 312 313 |
# File 'lib/dbc/ctokenizer.rb', line 310 def initialize(out, source, file=nil, line=1) super(source, file, line) @out = out end |
Instance Method Details
#shift ⇒ Object
315 316 317 318 319 |
# File 'lib/dbc/ctokenizer.rb', line 315 def shift t = super @out << t t end |