| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CSSTokenizer_h | 5 #ifndef CSSTokenizer_h |
| 6 #define CSSTokenizer_h | 6 #define CSSTokenizer_h |
| 7 | 7 |
| 8 #include "core/css/parser/CSSParserToken.h" | 8 #include "core/css/parser/CSSParserToken.h" |
| 9 #include "core/html/parser/InputStreamPreprocessor.h" | 9 #include "core/html/parser/InputStreamPreprocessor.h" |
| 10 #include "wtf/text/WTFString.h" | 10 #include "wtf/text/WTFString.h" |
| 11 | 11 |
| 12 #include <climits> | 12 #include <climits> |
| 13 | 13 |
| 14 namespace blink { | 14 namespace blink { |
| 15 | 15 |
| 16 class CSSTokenizerInputStream; | 16 class CSSTokenizerInputStream; |
| 17 class CSSParserTokenRange; |
| 17 | 18 |
| 18 class CSSTokenizer { | 19 class CSSTokenizer { |
| 19 WTF_MAKE_NONCOPYABLE(CSSTokenizer); | 20 WTF_MAKE_NONCOPYABLE(CSSTokenizer); |
| 20 WTF_MAKE_FAST_ALLOCATED; | 21 WTF_MAKE_FAST_ALLOCATED; |
| 21 public: | 22 public: |
| 22 static void tokenize(String, Vector<CSSParserToken>&); | 23 class Scope { |
| 24 public: |
| 25 Scope(const String&); |
| 26 CSSParserTokenRange tokenRange(); |
| 27 |
| 28 private: |
| 29 Vector<CSSParserToken> m_tokens; |
| 30 }; |
| 31 |
| 23 private: | 32 private: |
| 24 CSSTokenizer(CSSTokenizerInputStream&); | 33 CSSTokenizer(CSSTokenizerInputStream&); |
| 25 | 34 |
| 26 CSSParserToken nextToken(); | 35 CSSParserToken nextToken(); |
| 27 | 36 |
| 28 UChar consume(); | 37 UChar consume(); |
| 29 void consume(unsigned); | 38 void consume(unsigned); |
| 30 void reconsume(UChar); | 39 void reconsume(UChar); |
| 31 | 40 |
| 32 CSSParserToken consumeNumericToken(); | 41 CSSParserToken consumeNumericToken(); |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 88 CSSParserToken endOfFile(UChar); | 97 CSSParserToken endOfFile(UChar); |
| 89 | 98 |
| 90 CSSTokenizerInputStream& m_input; | 99 CSSTokenizerInputStream& m_input; |
| 91 }; | 100 }; |
| 92 | 101 |
| 93 | 102 |
| 94 | 103 |
| 95 } // namespace blink | 104 } // namespace blink |
| 96 | 105 |
| 97 #endif // CSSTokenizer_h | 106 #endif // CSSTokenizer_h |
| OLD | NEW |