| 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 |
| 119 // Returns whether the current token can possibly be a binary operator, given | 124 // Returns whether the current token can possibly be a binary operator, given |
| 120 // the previous token. Necessary to disambiguate some of the operators | 125 // the previous token. Necessary to disambiguate some of the operators |
| 121 // (* (multiply), div, and, or, mod) in the [32] Operator rule | 126 // (* (multiply), div, and, or, mod) in the [32] Operator rule |
| 122 // (check http://www.w3.org/TR/xpath#exprlex). | 127 // (check http://www.w3.org/TR/xpath#exprlex). |
| 123 bool Parser::isBinaryOperatorContext() const | 128 bool Parser::isBinaryOperatorContext() const |
| 124 { | 129 { |
| 125 switch (m_lastTokenType) { | 130 switch (m_lastTokenType) { |
| 126 case 0: | 131 case 0: |
| 127 case '@': case AXISNAME: case '(': case '[': case ',': | 132 case '@': case AXISNAME: case '(': case '[': case ',': |
| 128 case AND: case OR: case MULOP: | 133 case AND: case OR: case MULOP: |
| (...skipping 377 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 506 | 511 |
| 507 void Parser::deleteString(String* s) | 512 void Parser::deleteString(String* s) |
| 508 { | 513 { |
| 509 if (s == 0) | 514 if (s == 0) |
| 510 return; | 515 return; |
| 511 | 516 |
| 512 ASSERT(m_strings.contains(s)); | 517 ASSERT(m_strings.contains(s)); |
| 513 | 518 |
| 514 m_strings.remove(s); | 519 m_strings.remove(s); |
| 515 } | 520 } |
| OLD | NEW |