@Override public Symbol defineSymbol(int symbolType, JPNode defNode, JPNode idNode) { LOG.trace("Entering defineSymbol {} - {} - {}", symbolType, defNode, idNode); /* * Some notes: We need to create the Symbol right away, because further actions in the grammar might need to set * attributes on it. We can't add it to the scope yet, because of statements like this: def var xyz like xyz. The * tree parser is responsible for calling addToScope at the end of the statement or when it is otherwise safe to do * so. */ Symbol symbol = SymbolFactory.create(symbolType, idNode.getText(), currentScope); symbol.setDefOrIdNode(defNode); currSymbol = symbol; idNode.setLink(IConstants.SYMBOL, symbol); return symbol; }
@Override public Symbol defineSymbol(int symbolType, JPNode defNode, JPNode idNode) { LOG.trace("Entering defineSymbol {} - {} - {}", symbolType, defNode, idNode); /* * Some notes: We need to create the Symbol right away, because further actions in the grammar might need to set * attributes on it. We can't add it to the scope yet, because of statements like this: def var xyz like xyz. The * tree parser is responsible for calling addToScope at the end of the statement or when it is otherwise safe to do * so. */ Symbol symbol = SymbolFactory.create(symbolType, idNode.getText(), currentScope); symbol.setDefOrIdNode(defNode); currSymbol = symbol; idNode.setLink(IConstants.SYMBOL, symbol); return symbol; }