Search in sources :

Example 1 with UnknownIdentifierException

use of cz.cuni.mff.d3s.trupple.parser.exceptions.UnknownIdentifierException in project TrufflePascal by Aspect26.

the class IdentifiersTable method setSubroutineRootNode.

public void setSubroutineRootNode(String identifier, PascalRootNode rootNode) throws LexicalException {
    TypeDescriptor descriptor = this.identifiersMap.get(identifier);
    if (descriptor == null) {
        throw new UnknownIdentifierException(identifier);
    }
    ((SubroutineDescriptor) descriptor).setRootNode(rootNode);
}
Also used : TypeDescriptor(cz.cuni.mff.d3s.trupple.parser.identifierstable.types.TypeDescriptor) TypeTypeDescriptor(cz.cuni.mff.d3s.trupple.parser.identifierstable.types.TypeTypeDescriptor) UnknownIdentifierException(cz.cuni.mff.d3s.trupple.parser.exceptions.UnknownIdentifierException)

Aggregations

UnknownIdentifierException (cz.cuni.mff.d3s.trupple.parser.exceptions.UnknownIdentifierException)1 TypeDescriptor (cz.cuni.mff.d3s.trupple.parser.identifierstable.types.TypeDescriptor)1 TypeTypeDescriptor (cz.cuni.mff.d3s.trupple.parser.identifierstable.types.TypeTypeDescriptor)1