Class: Fbtxt::LexerResult
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.
6 7 8 |
# File 'lib/fbtxt/parser/lexer.rb', line 6 def initialize( tokens, errors=[] ) @tokens, @errors = tokens, errors end |
Instance Attribute Details
#errors ⇒ Object (readonly)
Returns the value of attribute errors.
5 6 7 |
# File 'lib/fbtxt/parser/lexer.rb', line 5 def errors @errors end |
#tokens ⇒ Object (readonly)
Returns the value of attribute tokens.
5 6 7 |
# File 'lib/fbtxt/parser/lexer.rb', line 5 def tokens @tokens end |
Instance Method Details
#nok? ⇒ Boolean
11 |
# File 'lib/fbtxt/parser/lexer.rb', line 11 def nok?() !ok?; end |
#ok? ⇒ Boolean
10 |
# File 'lib/fbtxt/parser/lexer.rb', line 10 def ok?() @errors.size == 0; end |