| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2005 Maksim Orlovich <maksim@kde.org> | 2 * Copyright 2005 Maksim Orlovich <maksim@kde.org> |
| 3 * Copyright (C) 2006 Apple Computer, Inc. | 3 * Copyright (C) 2006 Apple Computer, Inc. |
| 4 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org> | 4 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org> |
| 5 * | 5 * |
| 6 * Redistribution and use in source and binary forms, with or without | 6 * Redistribution and use in source and binary forms, with or without |
| 7 * modification, are permitted provided that the following conditions | 7 * modification, are permitted provided that the following conditions |
| 8 * are met: | 8 * are met: |
| 9 * | 9 * |
| 10 * 1. Redistributions of source code must retain the above copyright | 10 * 1. Redistributions of source code must retain the above copyright |
| (...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 109 DEFINE_STATIC_LOCAL(HashSet<String>, nodeTypeNames, ()); | 109 DEFINE_STATIC_LOCAL(HashSet<String>, nodeTypeNames, ()); |
| 110 if (nodeTypeNames.isEmpty()) { | 110 if (nodeTypeNames.isEmpty()) { |
| 111 nodeTypeNames.add("comment"); | 111 nodeTypeNames.add("comment"); |
| 112 nodeTypeNames.add("text"); | 112 nodeTypeNames.add("text"); |
| 113 nodeTypeNames.add("processing-instruction"); | 113 nodeTypeNames.add("processing-instruction"); |
| 114 nodeTypeNames.add("node"); | 114 nodeTypeNames.add("node"); |
| 115 } | 115 } |
| 116 return nodeTypeNames.contains(name); | 116 return nodeTypeNames.contains(name); |
| 117 } | 117 } |
| 118 | 118 |
| 119 XPathNSResolver* Parser::resolver() const | |
| 120 { | |
| 121 return m_resolver; | |
| 122 } | |
| 123 | |
| 124 // Returns whether the current token can possibly be a binary operator, given | 119 // Returns whether the current token can possibly be a binary operator, given |
| 125 // the previous token. Necessary to disambiguate some of the operators | 120 // the previous token. Necessary to disambiguate some of the operators |
| 126 // (* (multiply), div, and, or, mod) in the [32] Operator rule | 121 // (* (multiply), div, and, or, mod) in the [32] Operator rule |
| 127 // (check http://www.w3.org/TR/xpath#exprlex). | 122 // (check http://www.w3.org/TR/xpath#exprlex). |
| 128 bool Parser::isBinaryOperatorContext() const | 123 bool Parser::isBinaryOperatorContext() const |
| 129 { | 124 { |
| 130 switch (m_lastTokenType) { | 125 switch (m_lastTokenType) { |
| 131 case 0: | 126 case 0: |
| 132 case '@': case AXISNAME: case '(': case '[': case ',': | 127 case '@': case AXISNAME: case '(': case '[': case ',': |
| 133 case AND: case OR: case MULOP: | 128 case AND: case OR: case MULOP: |
| (...skipping 377 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 511 | 506 |
| 512 void Parser::deleteString(String* s) | 507 void Parser::deleteString(String* s) |
| 513 { | 508 { |
| 514 if (s == 0) | 509 if (s == 0) |
| 515 return; | 510 return; |
| 516 | 511 |
| 517 ASSERT(m_strings.contains(s)); | 512 ASSERT(m_strings.contains(s)); |
| 518 | 513 |
| 519 m_strings.remove(s); | 514 m_strings.remove(s); |
| 520 } | 515 } |
| OLD | NEW |