use of org.wso2.ballerinalang.compiler.util.diagnotic.DiagnosticPos in project ballerina by ballerina-lang.
the class BLangPackageBuilder method createDocumentationAttribute.
public void createDocumentationAttribute(DiagnosticPos pos, Set<Whitespace> ws, String attributeName, String endText, String docPrefix) {
BLangDocumentationAttribute attrib = (BLangDocumentationAttribute) TreeBuilder.createDocumentationAttributeNode();
attrib.documentationField = (BLangIdentifier) createIdentifier(attributeName);
attrib.documentationText = endText;
attrib.docTag = DocTag.fromString(docPrefix);
attrib.pos = pos;
attrib.addWS(ws);
docAttachmentStack.peek().addAttribute(attrib);
}
use of org.wso2.ballerinalang.compiler.util.diagnotic.DiagnosticPos in project ballerina by ballerina-lang.
the class BLangPackageBuilder method createBracedOrTupleExpression.
public void createBracedOrTupleExpression(DiagnosticPos pos, Set<Whitespace> ws, int numberOfExpressions) {
final BLangBracedOrTupleExpr expr = (BLangBracedOrTupleExpr) TreeBuilder.createBracedOrTupleExpression();
expr.pos = pos;
expr.addWS(ws);
for (int i = 0; i < numberOfExpressions; i++) {
expr.expressions.add(0, (BLangExpression) exprNodeStack.pop());
}
addExpressionNode(expr);
}
use of org.wso2.ballerinalang.compiler.util.diagnotic.DiagnosticPos in project ballerina by ballerina-lang.
the class BLangPackageBuilder method createTypeCastExpr.
public void createTypeCastExpr(DiagnosticPos pos, Set<Whitespace> ws) {
BLangTypeCastExpr typeCastNode = (BLangTypeCastExpr) TreeBuilder.createTypeCastNode();
typeCastNode.pos = pos;
typeCastNode.addWS(ws);
typeCastNode.expr = (BLangExpression) exprNodeStack.pop();
typeCastNode.typeNode = (BLangType) typeNodeStack.pop();
addExpressionNode(typeCastNode);
}
use of org.wso2.ballerinalang.compiler.util.diagnotic.DiagnosticPos in project ballerina by ballerina-lang.
the class BLangPackageBuilder method createFieldBasedAccessNode.
public void createFieldBasedAccessNode(DiagnosticPos pos, Set<Whitespace> ws, String fieldName, FieldType fieldType) {
BLangFieldBasedAccess fieldBasedAccess = (BLangFieldBasedAccess) TreeBuilder.createFieldBasedAccessNode();
fieldBasedAccess.pos = pos;
fieldBasedAccess.addWS(ws);
fieldBasedAccess.field = (BLangIdentifier) createIdentifier(fieldName);
fieldBasedAccess.expr = (BLangVariableReference) exprNodeStack.pop();
fieldBasedAccess.fieldType = fieldType;
addExpressionNode(fieldBasedAccess);
}
use of org.wso2.ballerinalang.compiler.util.diagnotic.DiagnosticPos in project ballerina by ballerina-lang.
the class BLangPackageBuilder method createDeprecatedNode.
public void createDeprecatedNode(DiagnosticPos pos, Set<Whitespace> ws, String content) {
BLangDeprecatedNode deprecatedNode = (BLangDeprecatedNode) TreeBuilder.createDeprecatedNode();
deprecatedNode.pos = pos;
deprecatedNode.addWS(ws);
deprecatedNode.documentationText = content;
deprecatedAttachmentStack.push(deprecatedNode);
}
Aggregations