use of org.wso2.ballerinalang.compiler.tree.types.BLangArrayType in project ballerina by ballerina-lang.
the class BLangPackageBuilder method addArrayType.
public void addArrayType(DiagnosticPos pos, Set<Whitespace> ws, int dimensions) {
BLangType eType = (BLangType) this.typeNodeStack.pop();
BLangArrayType arrayTypeNode = (BLangArrayType) TreeBuilder.createArrayTypeNode();
arrayTypeNode.addWS(ws);
arrayTypeNode.pos = pos;
arrayTypeNode.elemtype = eType;
arrayTypeNode.dimensions = dimensions;
addType(arrayTypeNode);
}
use of org.wso2.ballerinalang.compiler.tree.types.BLangArrayType in project ballerina by ballerina-lang.
the class BLangPackageBuilder method addRestParam.
public void addRestParam(DiagnosticPos pos, Set<Whitespace> ws, String identifier, int annotCount) {
BLangVariable restParam = (BLangVariable) this.generateBasicVarNode(pos, ws, identifier, false);
attachAnnotations(restParam, annotCount);
restParam.pos = pos;
BLangArrayType typeNode = (BLangArrayType) TreeBuilder.createArrayTypeNode();
typeNode.elemtype = restParam.typeNode;
typeNode.dimensions = 1;
restParam.typeNode = typeNode;
this.restParamStack.push(restParam);
}
Aggregations