Class: Oppen::Token::EOF

Inherits:
Oppen::Token show all
Defined in:
lib/oppen/token.rb

Overview

Note:

Multiple EOF tokens can be present in the same list of tokens.

The EOF token can be interpreted as an output flush operation.

Examples:

tokens = [
  Oppen::Token::Begin.new,
  Oppen::Token::String.new('XXXXXXXXXX'),
  Oppen::Token::End.new,
  Oppen::Token::EOF.new,
  Oppen::Token::Begin.new,
  Oppen::Token::String.new('YYYYYYYYYY'),
  Oppen::Token::End.new,
]
Oppen.print tokens:

# =>
# XXXXXXXXXX

tokens = [
  Oppen::Token::Begin.new,
  Oppen::Token::String.new('XXXXXXXXXX'),
  Oppen::Token::End.new,
  Oppen::Token::Begin.new,
  Oppen::Token::String.new('YYYYYYYYYY'),
  Oppen::Token::End.new,
  Oppen::Token::EOF.new,
]
Oppen.print tokens:

# =>
# XXXXXXXXXXYYYYYYYYYY

Method Summary

Methods inherited from Oppen::Token

#width