use of org.wso2.ballerinalang.compiler.parser.antlr4.BallerinaParser.FieldContext in project ballerina by ballerina-lang.
the class BLangParserListener method exitFieldVariableReference.
@Override
public void exitFieldVariableReference(BallerinaParser.FieldVariableReferenceContext ctx) {
if (ctx.exception != null) {
return;
}
FieldContext field = ctx.field();
String fieldName;
FieldType fieldType;
if (field.Identifier() != null) {
fieldName = field.Identifier().getText();
fieldType = FieldType.SINGLE;
} else {
fieldName = field.MUL().getText();
fieldType = FieldType.ALL;
}
this.pkgBuilder.createFieldBasedAccessNode(getCurrentPos(ctx), getWS(ctx), fieldName, fieldType);
}
Aggregations