use of org.wso2.ballerinalang.compiler.util.diagnotic.DiagnosticPos in project ballerina by ballerina-lang.
the class BLangPackageBuilder method startPatternClause.
public void startPatternClause(DiagnosticPos pos, Set<Whitespace> ws) {
PatternClause patternClause = TreeBuilder.createPatternClause();
((BLangPatternClause) patternClause).pos = pos;
patternClause.addWS(ws);
this.patternClauseStack.push(patternClause);
}
use of org.wso2.ballerinalang.compiler.util.diagnotic.DiagnosticPos in project ballerina by ballerina-lang.
the class BLangPackageBuilder method addConstVariable.
public void addConstVariable(DiagnosticPos pos, Set<Whitespace> ws, String identifier, boolean publicVar, boolean safeAssignment) {
BLangVariable var = (BLangVariable) this.generateBasicVarNode(pos, ws, identifier, true);
var.flagSet.add(Flag.CONST);
if (publicVar) {
var.flagSet.add(Flag.PUBLIC);
}
var.docTag = DocTag.VARIABLE;
var.safeAssignment = safeAssignment;
attachAnnotations(var);
attachDocumentations(var);
attachDeprecatedNode(var);
this.compUnit.addTopLevelNode(var);
}
use of org.wso2.ballerinalang.compiler.util.diagnotic.DiagnosticPos in project ballerina by ballerina-lang.
the class BLangPackageBuilder method addFailStatement.
public void addFailStatement(DiagnosticPos pos, Set<Whitespace> ws) {
BLangFail failNode = (BLangFail) TreeBuilder.createFailNode();
failNode.pos = pos;
failNode.addWS(ws);
addStmtToCurrentBlock(failNode);
}
use of org.wso2.ballerinalang.compiler.util.diagnotic.DiagnosticPos in project ballerina by ballerina-lang.
the class BLangPackageBuilder method addNameReference.
public void addNameReference(DiagnosticPos currentPos, Set<Whitespace> ws, String pkgName, String name) {
IdentifierNode pkgNameNode = createIdentifier(pkgName);
IdentifierNode nameNode = createIdentifier(name);
nameReferenceStack.push(new BLangNameReference(currentPos, ws, pkgNameNode, nameNode));
}
use of org.wso2.ballerinalang.compiler.util.diagnotic.DiagnosticPos in project ballerina by ballerina-lang.
the class BLangPackageBuilder method addReturnParam.
public BLangVariable addReturnParam(DiagnosticPos pos, Set<Whitespace> ws, String identifier, boolean exprAvailable, int annotCount) {
BLangVariable var = (BLangVariable) this.generateBasicVarNode(pos, ws, identifier, exprAvailable);
attachAnnotations(var, annotCount);
var.pos = pos;
this.varStack.push(var);
return var;
}
Aggregations