use of cz.cuni.mff.d3s.trupple.parser.identifierstable.types.TypeTypeDescriptor in project TrufflePascal by Aspect26.
the class IdentifiersTable method addBuiltinTypes.
protected void addBuiltinTypes() {
typeDescriptors.put("integer", IntDescriptor.getInstance());
typeDescriptors.put("shortint", IntDescriptor.getInstance());
typeDescriptors.put("longint", LongDescriptor.getInstance());
typeDescriptors.put("int64", LongDescriptor.getInstance());
typeDescriptors.put("byte", IntDescriptor.getInstance());
typeDescriptors.put("single", RealDescriptor.getInstance());
typeDescriptors.put("real", RealDescriptor.getInstance());
typeDescriptors.put("boolean", BooleanDescriptor.getInstance());
typeDescriptors.put("char", CharDescriptor.getInstance());
for (Map.Entry<String, TypeDescriptor> typeEntry : typeDescriptors.entrySet()) {
identifiersMap.put(typeEntry.getKey(), new TypeTypeDescriptor(typeEntry.getValue()));
}
}
use of cz.cuni.mff.d3s.trupple.parser.identifierstable.types.TypeTypeDescriptor in project TrufflePascal by Aspect26.
the class IdentifiersTable method addType.
public void addType(String identifier, TypeDescriptor typeDescriptor) throws LexicalException {
this.registerNewIdentifier(identifier, new TypeTypeDescriptor(typeDescriptor));
this.typeDescriptors.put(identifier, typeDescriptor);
}
Aggregations