use of cz.cuni.mff.d3s.trupple.parser.identifierstable.types.constant.ConstantDescriptor in project TrufflePascal by Aspect26.
the class FatalError method RecordVariant.
List<ConstantDescriptor> RecordVariant() {
List<ConstantDescriptor> caseConstants;
caseConstants = CaseConstantList();
Expect(25);
Expect(6);
TypeDescriptor type = RecordFieldList();
Expect(7);
return caseConstants;
}
use of cz.cuni.mff.d3s.trupple.parser.identifierstable.types.constant.ConstantDescriptor in project TrufflePascal by Aspect26.
the class FatalError method RecordVariantPart.
void RecordVariantPart() {
Expect(24);
OrdinalDescriptor selectorType = RecordVariantSelector();
Expect(14);
List<ConstantDescriptor> caseConstants = RecordVariants();
factory.assertLegalsCaseValues(selectorType, caseConstants);
}
use of cz.cuni.mff.d3s.trupple.parser.identifierstable.types.constant.ConstantDescriptor in project TrufflePascal by Aspect26.
the class FatalError method RecordVariant.
List<ConstantDescriptor> RecordVariant() {
List<ConstantDescriptor> caseConstants;
caseConstants = CaseConstantList();
Expect(24);
Expect(6);
TypeDescriptor type = RecordFieldList();
Expect(7);
return caseConstants;
}
use of cz.cuni.mff.d3s.trupple.parser.identifierstable.types.constant.ConstantDescriptor in project TrufflePascal by Aspect26.
the class FatalError method SubrangeType.
OrdinalDescriptor SubrangeType() {
OrdinalDescriptor ordinal;
ConstantDescriptor lowerBound = Constant();
Expect(26);
ConstantDescriptor upperBound = Constant();
ordinal = factory.createSimpleOrdinalDescriptor(lowerBound, upperBound);
return ordinal;
}
use of cz.cuni.mff.d3s.trupple.parser.identifierstable.types.constant.ConstantDescriptor in project TrufflePascal by Aspect26.
the class FatalError method Constant.
ConstantDescriptor Constant() {
ConstantDescriptor constant;
constant = null;
String sign = "";
if (la.kind == 28 || la.kind == 29) {
if (la.kind == 28) {
Get();
} else {
Get();
sign = t.val;
}
}
if (la.kind == 3) {
long value = UnsignedIntegerLiteral();
constant = factory.createNumericConstant(sign, value);
} else if (la.kind == 4) {
double value = UnsignedDoubleLiteral();
constant = factory.createDoubleConstant(sign, value);
} else if (la.kind == 2) {
String value = StringLiteral();
constant = factory.createCharOrStringConstant(sign, value);
} else if (la.kind == 64 || la.kind == 65) {
boolean value = LogicLiteral();
constant = factory.createBooleanConstant(sign, value);
} else if (la.kind == 1) {
Token identifier = IdentifierConstant();
constant = factory.createConstantFromIdentifier(sign, identifier);
} else
SynErr(76);
return constant;
}
Aggregations