Exemplo n.º 1
0
  public Macro newMacro(PMacro pDeclaration) {

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

    if (pDeclaration.parent() instanceof AMacroSourceFilePart) {
      throw new InternalException("pDeclaration may not be a top-level macro");
    }

    Macro macro = getGlobalIndex().newMacro(pDeclaration, this);

    this.macroMap.put(macro.getName(), macro);
    this.macros.add(macro);

    return macro;
  }