use of org.wso2.ballerinalang.compiler.tree.BLangVariable in project ballerina by ballerina-lang.
the class SemanticAnalyzer method createVarDef.
private BLangVariableDef createVarDef(BLangVariable var) {
BLangVariableDef varDefNode = new BLangVariableDef();
varDefNode.var = var;
varDefNode.pos = var.pos;
return varDefNode;
}
use of org.wso2.ballerinalang.compiler.tree.BLangVariable in project ballerina by ballerina-lang.
the class CodeGenerator method visitForkJoinParameterDefs.
private void visitForkJoinParameterDefs(BLangVariable parameterDef, SymbolEnv forkJoinEnv) {
LocalVariableAttributeInfo localVariableAttributeInfo = new LocalVariableAttributeInfo(1);
parameterDef.symbol.varIndex = getLVIndex(parameterDef.type.tag);
this.genNode(parameterDef, forkJoinEnv);
LocalVariableInfo localVariableDetails = this.getLocalVarAttributeInfo(parameterDef.symbol);
localVariableAttributeInfo.localVars.add(localVariableDetails);
}
use of org.wso2.ballerinalang.compiler.tree.BLangVariable 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.tree.BLangVariable 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.tree.BLangVariable in project ballerina by ballerina-lang.
the class ASTBuilderUtil method createVariable.
static BLangVariable createVariable(DiagnosticPos pos, String name, BType type, BLangExpression expr, BVarSymbol varSymbol) {
final BLangVariable varNode = (BLangVariable) TreeBuilder.createVariableNode();
varNode.pos = pos;
varNode.name = createIdentifier(pos, name);
varNode.type = type;
varNode.expr = expr;
varNode.symbol = varSymbol;
return varNode;
}
Aggregations