Class: Fbtxt::LexerResult
- Inherits:
-
Object
- Object
- Fbtxt::LexerResult
- Defined in:
- lib/fbtxt/lexer.rb
Instance Attribute Summary collapse
-
#errors ⇒ Object
readonly
Returns the value of attribute errors.
-
#tokens ⇒ Object
readonly
Returns the value of attribute tokens.
Instance Method Summary collapse
-
#initialize(tokens, errors = []) ⇒ LexerResult
constructor
A new instance of LexerResult.
- #nok? ⇒ Boolean
- #ok? ⇒ Boolean
Constructor Details
#initialize(tokens, errors = []) ⇒ LexerResult
Returns a new instance of LexerResult.
99 100 101 |
# File 'lib/fbtxt/lexer.rb', line 99 def initialize( tokens, errors=[] ) @tokens, @errors = tokens, errors end |
Instance Attribute Details
#errors ⇒ Object (readonly)
Returns the value of attribute errors.
98 99 100 |
# File 'lib/fbtxt/lexer.rb', line 98 def errors @errors end |
#tokens ⇒ Object (readonly)
Returns the value of attribute tokens.
98 99 100 |
# File 'lib/fbtxt/lexer.rb', line 98 def tokens @tokens end |
Instance Method Details
#nok? ⇒ Boolean
104 |
# File 'lib/fbtxt/lexer.rb', line 104 def nok?() !ok?; end |
#ok? ⇒ Boolean
103 |
# File 'lib/fbtxt/lexer.rb', line 103 def ok?() @errors.size == 0; end |