コード例 #1
0
  /** @see de.unika.ipd.grgen.ast.BaseNode#resolveLocal() */
  @Override
  protected boolean resolveLocal() {
    if (startNodeTypeUnresolved == null) {
      reportError(functionName + "() takes 1-3 parameters.");
      return false;
    }

    if (startNodeTypeUnresolved instanceof PackageIdentNode)
      Resolver.resolveOwner((PackageIdentNode) startNodeTypeUnresolved);
    else if (startNodeTypeUnresolved instanceof IdentNode)
      fixupDefinition((IdentNode) startNodeTypeUnresolved, startNodeTypeUnresolved.getScope());
    startNodeType = typeResolver.resolve(startNodeTypeUnresolved, this);
    if (startNodeType == null) return false;

    if (incidentEdgeTypeUnresolved instanceof PackageIdentNode)
      Resolver.resolveOwner((PackageIdentNode) incidentEdgeTypeUnresolved);
    else if (incidentEdgeTypeUnresolved instanceof IdentNode)
      fixupDefinition(
          (IdentNode) incidentEdgeTypeUnresolved, incidentEdgeTypeUnresolved.getScope());
    incidentEdgeType = typeResolver.resolve(incidentEdgeTypeUnresolved, this);
    if (incidentEdgeType == null) return false;

    if (adjacentNodeTypeUnresolved instanceof PackageIdentNode)
      Resolver.resolveOwner((PackageIdentNode) adjacentNodeTypeUnresolved);
    else if (adjacentNodeTypeUnresolved instanceof IdentNode)
      fixupDefinition(
          (IdentNode) adjacentNodeTypeUnresolved, adjacentNodeTypeUnresolved.getScope());
    adjacentNodeType = typeResolver.resolve(adjacentNodeTypeUnresolved, this);
    if (adjacentNodeType == null) return false;

    return true;
  }
コード例 #2
0
ファイル: CastNode.java プロジェクト: jblomer/GrGen.NET
 /** @see de.unika.ipd.grgen.ast.BaseNode#resolveLocal() */
 @Override
 protected boolean resolveLocal() {
   boolean successfullyResolved = true;
   if (typeUnresolved instanceof PackageIdentNode)
     Resolver.resolveOwner((PackageIdentNode) typeUnresolved);
   else fixupDefinition(typeUnresolved, typeUnresolved.getScope());
   type = typeResolver.resolve(typeUnresolved, this);
   successfullyResolved = type != null && successfullyResolved;
   return successfullyResolved;
 }
コード例 #3
0
ファイル: TypeDeclNode.java プロジェクト: jblomer/GrGen.NET
  /** @see de.unika.ipd.grgen.ast.BaseNode#resolveLocal() */
  @Override
  protected boolean resolveLocal() {
    type = typeResolver.resolve(typeUnresolved, this);

    return type != null;
  }