Class: Kanayago::ParseResult
- Inherits:
-
Object
- Object
- Kanayago::ParseResult
- Defined in:
- lib/kanayago.rb
Instance Attribute Summary collapse
-
#ast ⇒ Object
readonly
Returns the value of attribute ast.
-
#error ⇒ Object
readonly
Returns the value of attribute error.
-
#script_lines ⇒ Object
readonly
Returns the value of attribute script_lines.
Instance Method Summary collapse
-
#initialize(ast, error, script_lines) ⇒ ParseResult
constructor
A new instance of ParseResult.
- #invalid? ⇒ Boolean
- #valid? ⇒ Boolean
Constructor Details
#initialize(ast, error, script_lines) ⇒ ParseResult
Returns a new instance of ParseResult.
21 22 23 24 25 |
# File 'lib/kanayago.rb', line 21 def initialize(ast, error, script_lines) @ast = ast @error = error @script_lines = script_lines end |
Instance Attribute Details
#ast ⇒ Object (readonly)
Returns the value of attribute ast.
19 20 21 |
# File 'lib/kanayago.rb', line 19 def ast @ast end |
#error ⇒ Object (readonly)
Returns the value of attribute error.
19 20 21 |
# File 'lib/kanayago.rb', line 19 def error @error end |
#script_lines ⇒ Object (readonly)
Returns the value of attribute script_lines.
19 20 21 |
# File 'lib/kanayago.rb', line 19 def script_lines @script_lines end |
Instance Method Details
#invalid? ⇒ Boolean
27 28 29 |
# File 'lib/kanayago.rb', line 27 def invalid? @error.is_a?(SyntaxError) end |
#valid? ⇒ Boolean
31 32 33 |
# File 'lib/kanayago.rb', line 31 def valid? !invalid? end |