Search in sources :

Example 1 with BLangXMLProcInsLiteral

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

the class BLangPackageBuilder method createXMLPILiteral.

public void createXMLPILiteral(DiagnosticPos pos, Set<Whitespace> ws, String targetQName, Stack<String> precedingTextFragments, String endingText) {
    List<BLangExpression> dataExprs = getExpressionsInTemplate(pos, ws, precedingTextFragments, endingText, NodeKind.LITERAL);
    addLiteralValue(pos, ws, TypeTags.STRING, targetQName);
    BLangXMLProcInsLiteral xmlProcInsLiteral = (BLangXMLProcInsLiteral) TreeBuilder.createXMLProcessingIntsructionLiteralNode();
    xmlProcInsLiteral.pos = pos;
    xmlProcInsLiteral.dataFragments = dataExprs;
    xmlProcInsLiteral.target = (BLangLiteral) exprNodeStack.pop();
    ;
    addExpressionNode(xmlProcInsLiteral);
}
Also used : BLangXMLProcInsLiteral(org.wso2.ballerinalang.compiler.tree.expressions.BLangXMLProcInsLiteral) BLangExpression(org.wso2.ballerinalang.compiler.tree.expressions.BLangExpression)

Aggregations

BLangExpression (org.wso2.ballerinalang.compiler.tree.expressions.BLangExpression)1 BLangXMLProcInsLiteral (org.wso2.ballerinalang.compiler.tree.expressions.BLangXMLProcInsLiteral)1