Exemplo n.º 1
0
  public void handleFunction(ASTFunction node) {
    // Get the function's symbol table, set it's previous to the
    // calling function's, and then set it to current.
    connector.startSnap(node.getLineNumber());
    if (node.getName().equals("main")) {
      connector.addQuestion(startQuestion);
      connector.showScope("main");

    } else {
    }
    connector.endSnap();
    if (!node.getUsed()) {
      return;
    }
    SymbolTable currentSymbolTable = node.getSymbolTable();
    for (String p : node.getParameters()) {
      ByNameVariable v = new ByNameVariable();
      v.setParam();
      currentSymbolTable.put(p, v);
    }
    Global.setCurrentSymbolTable(currentSymbolTable);

    node.jjtGetChild(0).jjtAccept(this, null);
    leaveScope();
  }