use of org.wso2.ballerinalang.compiler.util.diagnotic.DiagnosticPos in project ballerina by ballerina-lang.
the class ASTBuilderUtil method createMatchStatementPattern.
static BLangMatchStmtPatternClause createMatchStatementPattern(DiagnosticPos pos, BLangVariable variable, BLangBlockStmt body) {
BLangMatchStmtPatternClause patternClause = (BLangMatchStmtPatternClause) TreeBuilder.createMatchStatementPattern();
patternClause.pos = pos;
patternClause.variable = variable;
patternClause.body = body;
return patternClause;
}
use of org.wso2.ballerinalang.compiler.util.diagnotic.DiagnosticPos in project ballerina by ballerina-lang.
the class ASTBuilderUtil method createTypeofExpr.
static BLangTypeofExpr createTypeofExpr(DiagnosticPos pos, BType type, BType resolvedType) {
final BLangTypeofExpr typeofExpr = (BLangTypeofExpr) TreeBuilder.createTypeAccessNode();
typeofExpr.pos = pos;
typeofExpr.type = type;
typeofExpr.resolvedType = resolvedType;
return typeofExpr;
}
use of org.wso2.ballerinalang.compiler.util.diagnotic.DiagnosticPos in project ballerina by ballerina-lang.
the class ASTBuilderUtil method createBlockStmt.
static BLangBlockStmt createBlockStmt(DiagnosticPos pos, List<BLangStatement> stmts) {
final BLangBlockStmt blockNode = (BLangBlockStmt) TreeBuilder.createBlockNode();
blockNode.pos = pos;
blockNode.stmts = stmts;
return blockNode;
}
use of org.wso2.ballerinalang.compiler.util.diagnotic.DiagnosticPos in project ballerina by ballerina-lang.
the class ASTBuilderUtil method createVariableDef.
static BLangVariableDef createVariableDef(DiagnosticPos pos, BLangVariable variable) {
final BLangVariableDef variableDef = (BLangVariableDef) TreeBuilder.createVariableDefinitionNode();
variableDef.pos = pos;
variableDef.var = variable;
return variableDef;
}
use of org.wso2.ballerinalang.compiler.util.diagnotic.DiagnosticPos in project ballerina by ballerina-lang.
the class ASTBuilderUtil method createMatchStatement.
static BLangMatch createMatchStatement(DiagnosticPos pos, BLangExpression expr, List<BLangMatchStmtPatternClause> patternClauses) {
BLangMatch matchStmt = (BLangMatch) TreeBuilder.createMatchStatement();
matchStmt.pos = pos;
matchStmt.expr = expr;
matchStmt.patternClauses = patternClauses;
return matchStmt;
}
Aggregations