use of org.eclipse.titan.designer.AST.ASN1.ASN1Type in project titan.EclipsePlug-ins by eclipse.
the class ObjectClassSyntax_Parser method visitSetting.
@Override
public /**
* {@inheritDoc}
*/
void visitSetting(final ObjectClassSyntax_setting parameter) {
FieldSetting fieldSetting = null;
switch(parameter.getSettingType()) {
case S_T:
final ASN1Type type = parseType();
if (null != type) {
fieldSetting = new FieldSetting_Type(parameter.getIdentifier().newInstance(), type);
fieldSetting.setLocation(mBlock.getLocation());
}
break;
case S_V:
final boolean parseSuccess = parseValue();
if (parseSuccess) {
fieldSetting = new FieldSetting_Value(parameter.getIdentifier().newInstance());
fieldSetting.setLocation(mBlock.getLocation());
}
break;
case S_VS:
// TODO mark as NOT SUPPORTED
break;
case S_O:
final ASN1Object object = parseObject();
if (null != object) {
fieldSetting = new FieldSetting_Object(parameter.getIdentifier().newInstance(), object);
fieldSetting.setLocation(mBlock.getLocation());
}
break;
case S_OS:
final ObjectSet objectSet = parseObjectSet();
if (null != objectSet) {
fieldSetting = new FieldSetting_ObjectSet(parameter.getIdentifier().newInstance(), objectSet);
fieldSetting.setLocation(mBlock.getLocation());
}
break;
case S_UNDEF:
// FATAL ERROR
default:
break;
}
previousSuccess = null != fieldSetting;
myObject.addFieldSetting(fieldSetting);
}
use of org.eclipse.titan.designer.AST.ASN1.ASN1Type in project titan.EclipsePlug-ins by eclipse.
the class ObjectClassSyntax_Parser method parseType.
private ASN1Type parseType() {
ASN1Type type = null;
if (mBlock != null) {
final Asn1Parser parser = BlockLevelTokenStreamTracker.getASN1ParserForBlock(mBlock, internalIndex);
if (parser != null) {
type = parser.pr_special_Type().type;
internalIndex += parser.nof_consumed_tokens();
final List<SyntacticErrorStorage> errors = parser.getErrorStorage();
if (null != errors && !errors.isEmpty()) {
for (int i = 0; i < errors.size(); i++) {
ParserMarkerSupport.createOnTheFlyMixedMarker((IFile) mBlock.getLocation().getFile(), errors.get(i), IMarker.SEVERITY_ERROR);
}
}
}
}
return type;
}
Aggregations