예제 #1
0
  public Expand getExpand(PExpand declaration) {

    if (declaration == null) {
      throw new InternalException("declaration may not be null");
    }

    Expand expand = getGlobalIndex().getExpand(declaration, this);

    if (expand.getEnclosingMacro() != this) {
      throw new InternalError("getExpand must be called on its enclosing macro");
    }

    ExpandSignature signature = expand.getSignature();
    this.expandSignatures.add(signature);

    for (Macro macro : signature.getMacroSet()) {
      this.explicitlyExpandedMacros.add(macro);
      macro.addCaller(this);
    }

    return expand;
  }