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 * | 4 * |
5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
7 * are met: | 7 * are met: |
8 * | 8 * |
9 * 1. Redistributions of source code must retain the above copyright | 9 * 1. Redistributions of source code must retain the above copyright |
10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
58 Token(int t) : type(t) { } | 58 Token(int t) : type(t) { } |
59 Token(int t, const String& v): type(t), str(v) { } | 59 Token(int t, const String& v): type(t), str(v) { } |
60 Token(int t, Step::Axis v): type(t), axis(v) { } | 60 Token(int t, Step::Axis v): type(t), axis(v) { } |
61 Token(int t, NumericOp::Opcode v): type(t), numop(v) { } | 61 Token(int t, NumericOp::Opcode v): type(t), numop(v) { } |
62 Token(int t, EqTestOp::Opcode v): type(t), eqop(v) { } | 62 Token(int t, EqTestOp::Opcode v): type(t), eqop(v) { } |
63 }; | 63 }; |
64 | 64 |
65 class Parser { | 65 class Parser { |
66 WTF_MAKE_NONCOPYABLE(Parser); | 66 WTF_MAKE_NONCOPYABLE(Parser); |
67 // FIXME: oilpan: This should be STACK_ALLOCATED. | 67 // FIXME: oilpan: This should be STACK_ALLOCATED. |
68 DISALLOW_ALLOCATION(); | 68 DISALLOW_ALLOCATION(); |
haraken
2014/03/24 13:52:54
This should be changed to STACK_ALLOCATED.
Mads Ager (chromium)
2014/03/24 14:27:30
Done.
| |
69 public: | 69 public: |
70 Parser(); | 70 Parser(); |
71 ~Parser(); | 71 ~Parser(); |
72 | 72 |
73 XPathNSResolver* resolver() const { return m_resolver.get(); } | 73 XPathNSResolver* resolver() const { return m_resolver.get(); } |
74 bool expandQName(const String& qName, AtomicString& localName, AtomicString& namespaceURI); | 74 bool expandQName(const String& qName, AtomicString& localName, AtomicString& namespaceURI); |
75 | 75 |
76 Expression* parseStatement(const String& statement, PassRefPtrWillBeRawPtr<X PathNSResolver>, ExceptionState&); | 76 Expression* parseStatement(const String& statement, PassRefPtrWillBeRawPtr<X PathNSResolver>, ExceptionState&); |
77 | 77 |
78 static Parser* current() { return currentParser; } | 78 static Parser* current() { return currentParser; } |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
115 Token nextToken(); | 115 Token nextToken(); |
116 Token nextTokenInternal(); | 116 Token nextTokenInternal(); |
117 | 117 |
118 void reset(const String& data); | 118 void reset(const String& data); |
119 | 119 |
120 static Parser* currentParser; | 120 static Parser* currentParser; |
121 | 121 |
122 unsigned m_nextPos; | 122 unsigned m_nextPos; |
123 String m_data; | 123 String m_data; |
124 int m_lastTokenType; | 124 int m_lastTokenType; |
125 RefPtrWillBeRawPtr<XPathNSResolver> m_resolver; | 125 RefPtrWillBeRawPtr<XPathNSResolver> m_resolver = nullptr; |
haraken
2014/03/24 13:52:54
Then use RefPtrWillBeMember.
Mads Ager (chromium)
2014/03/24 14:27:30
Yes, doen.
| |
126 | 126 |
127 HashSet<ParseNode*> m_parseNodes; | 127 HashSet<ParseNode*> m_parseNodes; |
128 HashSet<Vector<OwnPtr<Predicate> >*> m_predicateVectors; | 128 HashSet<Vector<OwnPtr<Predicate> >*> m_predicateVectors; |
129 HashSet<Vector<OwnPtr<Expression> >*> m_expressionVectors; | 129 HashSet<Vector<OwnPtr<Expression> >*> m_expressionVectors; |
130 HashSet<String*> m_strings; | 130 HashSet<String*> m_strings; |
131 HashSet<Step::NodeTest*> m_nodeTests; | 131 HashSet<Step::NodeTest*> m_nodeTests; |
132 }; | 132 }; |
133 | 133 |
134 } // XPath | 134 } // XPath |
135 | 135 |
136 } // WebCore | 136 } // WebCore |
137 | 137 |
138 #endif | 138 #endif |
OLD | NEW |