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 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
148 const uc16* pushback_buffer_end_cache_; | 148 const uc16* pushback_buffer_end_cache_; |
149 uc16* pushback_buffer_backing_; | 149 uc16* pushback_buffer_backing_; |
150 unsigned pushback_buffer_backing_size_; | 150 unsigned pushback_buffer_backing_size_; |
151 }; | 151 }; |
152 | 152 |
153 | 153 |
154 class StandAloneJavaScriptScanner : public JavaScriptScanner { | 154 class StandAloneJavaScriptScanner : public JavaScriptScanner { |
155 public: | 155 public: |
156 void Initialize(UC16CharacterStream* source) { | 156 void Initialize(UC16CharacterStream* source) { |
157 source_ = source; | 157 source_ = source; |
158 literal_flags_ = kLiteralString | kLiteralIdentifier; | |
159 Init(); | 158 Init(); |
160 // Skip initial whitespace allowing HTML comment ends just like | 159 // Skip initial whitespace allowing HTML comment ends just like |
161 // after a newline and scan first token. | 160 // after a newline and scan first token. |
162 has_line_terminator_before_next_ = true; | 161 has_line_terminator_before_next_ = true; |
163 SkipWhiteSpace(); | 162 SkipWhiteSpace(); |
164 Scan(); | 163 Scan(); |
165 } | 164 } |
166 }; | 165 }; |
167 | 166 |
168 | 167 |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
200 return PreParserData(size, data); | 199 return PreParserData(size, data); |
201 } | 200 } |
202 | 201 |
203 } // namespace v8. | 202 } // namespace v8. |
204 | 203 |
205 | 204 |
206 // Used by ASSERT macros and other immediate exits. | 205 // Used by ASSERT macros and other immediate exits. |
207 extern "C" void V8_Fatal(const char* file, int line, const char* format, ...) { | 206 extern "C" void V8_Fatal(const char* file, int line, const char* format, ...) { |
208 exit(EXIT_FAILURE); | 207 exit(EXIT_FAILURE); |
209 } | 208 } |
OLD | NEW |