Project

Profile

Help

Revision e14d46a4

Added by Michael Kay almost 13 years ago

Fix bug 2523897 (numeric key value in match pattern)

View differences:

latest9.1/bj/net/sf/saxon/expr/ExpressionParser.java
2089 2089
                        Expression idValue;
2090 2090
                        if (t.currentToken == Token.STRING_LITERAL) {
2091 2091
                            idValue = new StringLiteral(t.currentTokenValue);
2092
                        } else if (t.currentToken == Token.NUMBER) {
2093
                            NumericValue number = NumericValue.parseNumber(t.currentTokenValue);
2094
                            if (number.isNaN()) {
2095
                                grumble("Invalid numeric literal " + Err.wrap(t.currentTokenValue, Err.VALUE));
2096
                            }
2097
                            idValue = new Literal(number);
2092 2098
                        } else if (t.currentToken == Token.DOLLAR) {
2093 2099
                            nextToken();
2094 2100
                            expect(Token.NAME);

Also available in: Unified diff