Class: Duby::NbCompiler::ParseResult

Inherits:
Object
  • Object
show all
Defined in:
lib/duby/nbcompiler.rb

Constant Summary collapse

ParseError =
org.jruby.duby.ParseError

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(ast, errors) ⇒ ParseResult

Returns a new instance of ParseResult.



12
13
14
15
16
17
18
# File 'lib/duby/nbcompiler.rb', line 12

def initialize(ast, errors)
  @ast = ast
  parse_errors = errors.map do |error|
    ParseError.new(error.message, error.position)
  end
  @errors = parse_errors.to_java(ParseError)
end

Instance Attribute Details

#astObject (readonly)

Returns the value of attribute ast.



11
12
13
# File 'lib/duby/nbcompiler.rb', line 11

def ast
  @ast
end

#errorsObject (readonly)

Returns the value of attribute errors.



11
12
13
# File 'lib/duby/nbcompiler.rb', line 11

def errors
  @errors
end