Search in sources :

Example 1 with BLangXMLQuotedString

use of org.wso2.ballerinalang.compiler.tree.expressions.BLangXMLQuotedString in project ballerina by ballerina-lang.

the class BLangPackageBuilder method createXMLQuotedLiteral.

public void createXMLQuotedLiteral(DiagnosticPos pos, Set<Whitespace> ws, Stack<String> precedingTextFragments, String endingText, QuoteType quoteType) {
    List<BLangExpression> templateExprs = getExpressionsInTemplate(pos, ws, precedingTextFragments, endingText, NodeKind.LITERAL);
    BLangXMLQuotedString quotedString = (BLangXMLQuotedString) TreeBuilder.createXMLQuotedStringNode();
    quotedString.pos = pos;
    quotedString.quoteType = quoteType;
    quotedString.textFragments = templateExprs;
    addExpressionNode(quotedString);
}
Also used : BLangXMLQuotedString(org.wso2.ballerinalang.compiler.tree.expressions.BLangXMLQuotedString) BLangExpression(org.wso2.ballerinalang.compiler.tree.expressions.BLangExpression)

Example 2 with BLangXMLQuotedString

use of org.wso2.ballerinalang.compiler.tree.expressions.BLangXMLQuotedString in project ballerina by ballerina-lang.

the class BLangPackageBuilder method createXMLAttribute.

public void createXMLAttribute(DiagnosticPos pos, Set<Whitespace> ws) {
    BLangXMLAttribute xmlAttribute = (BLangXMLAttribute) TreeBuilder.createXMLAttributeNode();
    xmlAttribute.value = (BLangXMLQuotedString) exprNodeStack.pop();
    xmlAttribute.name = (BLangExpression) exprNodeStack.pop();
    xmlAttribute.pos = pos;
    xmlAttribute.addWS(ws);
    xmlAttributeNodeStack.push(xmlAttribute);
}
Also used : BLangXMLAttribute(org.wso2.ballerinalang.compiler.tree.expressions.BLangXMLAttribute)

Aggregations

BLangExpression (org.wso2.ballerinalang.compiler.tree.expressions.BLangExpression)1 BLangXMLAttribute (org.wso2.ballerinalang.compiler.tree.expressions.BLangXMLAttribute)1 BLangXMLQuotedString (org.wso2.ballerinalang.compiler.tree.expressions.BLangXMLQuotedString)1