OLD | NEW |
1 // Copyright 2010 the V8 project authors. All rights reserved. | 1 // Copyright 2010 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
127 | 127 |
128 | 128 |
129 // ---------------------------------------------------------------------------- | 129 // ---------------------------------------------------------------------------- |
130 // V8JavaScriptScanner | 130 // V8JavaScriptScanner |
131 // JavaScript scanner getting its input from either a V8 String or a unicode | 131 // JavaScript scanner getting its input from either a V8 String or a unicode |
132 // CharacterStream. | 132 // CharacterStream. |
133 | 133 |
134 class V8JavaScriptScanner : public JavaScriptScanner { | 134 class V8JavaScriptScanner : public JavaScriptScanner { |
135 public: | 135 public: |
136 V8JavaScriptScanner(); | 136 V8JavaScriptScanner(); |
137 void Initialize(UC16CharacterStream* source, | 137 void Initialize(UC16CharacterStream* source); |
138 int literal_flags = kAllLiterals); | |
139 }; | 138 }; |
140 | 139 |
141 | 140 |
142 class JsonScanner : public Scanner { | 141 class JsonScanner : public Scanner { |
143 public: | 142 public: |
144 JsonScanner(); | 143 JsonScanner(); |
145 | 144 |
146 void Initialize(UC16CharacterStream* source); | 145 void Initialize(UC16CharacterStream* source); |
147 | 146 |
148 // Returns the next token. | 147 // Returns the next token. |
(...skipping 27 matching lines...) Expand all Loading... |
176 | 175 |
177 // Used to recognizes one of the literals "true", "false", or "null". These | 176 // Used to recognizes one of the literals "true", "false", or "null". These |
178 // are the only valid JSON identifiers (productions JSONBooleanLiteral, | 177 // are the only valid JSON identifiers (productions JSONBooleanLiteral, |
179 // JSONNullLiteral). | 178 // JSONNullLiteral). |
180 Token::Value ScanJsonIdentifier(const char* text, Token::Value token); | 179 Token::Value ScanJsonIdentifier(const char* text, Token::Value token); |
181 }; | 180 }; |
182 | 181 |
183 } } // namespace v8::internal | 182 } } // namespace v8::internal |
184 | 183 |
185 #endif // V8_SCANNER_H_ | 184 #endif // V8_SCANNER_H_ |
OLD | NEW |