Exception: CodeModels::UnknownNodeType

Inherits:
ParsingError
  • Object
show all
Defined in:
lib/codemodels/parser.rb

Overview

Most CodeModels parser are actually wrapping another parser and adapting it to CodeModels. When they encounter a node type they do not know how to wrap this error is thrown.

This is not just for java based parsers, so it should be not moved to codemodels-javaparserwrapper

Instance Attribute Summary

Attributes inherited from ParsingError

#column, #line, #node

Instance Method Summary collapse

Methods inherited from ParsingError

#to_s

Constructor Details

#initialize(node, line = nil, node_type = nil, where = nil) ⇒ UnknownNodeType

Returns a new instance of UnknownNodeType.

Parameters:

  • node

    the node that can not be translated

  • node_type (defaults to: nil)

    node that is not understood

  • where (defaults to: nil)

    describe where the node was contained (artifact, line, column)



84
85
86
# File 'lib/codemodels/parser.rb', line 84

def initialize(node,line=nil,node_type=nil,where=nil)
  super(node,"UnknownNodeType: type=#{node_type} , where: #{where}")
end