Sha256: 4d303129c0710a8956bdd05ebe53134e44d3e669a7e17faabbaec91a6ed199bc
Contents?: true
Size: 766 Bytes
Versions: 14
Compression:
Stored size: 766 Bytes
Contents
require "expressir/express_exp/model_visitor" require "expressir/model" module Expressir module ExpressExp class ResolveReferencesModelVisitor < ModelVisitor def visit(node) if node.is_a? Model::Expressions::SimpleReference visit_expressions_simple_reference(node) end super end def visit_expressions_simple_reference(node) return if node.parent.is_a? Model::Expressions::AttributeReference if node.parent.is_a? Model::InterfaceItem base_item = node.find("#{node.parent.parent.schema.id}.#{node.parent.ref.id}") else base_item = node.find(node.id) end return unless base_item node.base_path = base_item.path end end end end
Version data entries
14 entries across 14 versions & 1 rubygems