* xmlXPathCompPrimaryExpr: * @ctxt: the XPath Parser context * * [15] PrimaryExpr ::= VariableReference * | '(' Expr ')' * | Literal * | Number * | FunctionCall * * Compile a primary expression. */
| 9421 | * Compile a primary expression. |
| 9422 | */ |
| 9423 | static void |
| 9424 | xmlXPathCompPrimaryExpr(xmlXPathParserContextPtr ctxt) { |
| 9425 | SKIP_BLANKS; |
| 9426 | if (CUR == '$') xmlXPathCompVariableReference(ctxt); |
| 9427 | else if (CUR == '(') { |
| 9428 | NEXT; |
| 9429 | SKIP_BLANKS; |
| 9430 | xmlXPathCompileExpr(ctxt, 1); |
| 9431 | CHECK_ERROR; |
| 9432 | if (CUR != ')') { |
| 9433 | XP_ERROR(XPATH_EXPR_ERROR); |
| 9434 | } |
| 9435 | NEXT; |
| 9436 | SKIP_BLANKS; |
| 9437 | } else if (IS_ASCII_DIGIT(CUR) || (CUR == '.' && IS_ASCII_DIGIT(NXT(1)))) { |
| 9438 | xmlXPathCompNumber(ctxt); |
| 9439 | } else if ((CUR == '\'') || (CUR == '"')) { |
| 9440 | xmlXPathCompLiteral(ctxt); |
| 9441 | } else { |
| 9442 | xmlXPathCompFunctionCall(ctxt); |
| 9443 | } |
| 9444 | SKIP_BLANKS; |
| 9445 | } |
| 9446 | |
| 9447 | /** |
| 9448 | * xmlXPathCompFilterExpr: |
no test coverage detected