Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(47)

Side by Side Diff: src/preparser-api.cc

Issue 7218009: Make multi-line comments not count when checking whether --> is first on a line. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Undid too much. Created 9 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/preparser.cc ('k') | src/scanner.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 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 151 matching lines...) Expand 10 before | Expand all | Expand 10 after
162 public: 162 public:
163 explicit StandAloneJavaScriptScanner(UnicodeCache* unicode_cache) 163 explicit StandAloneJavaScriptScanner(UnicodeCache* unicode_cache)
164 : JavaScriptScanner(unicode_cache) { } 164 : JavaScriptScanner(unicode_cache) { }
165 165
166 void Initialize(UC16CharacterStream* source) { 166 void Initialize(UC16CharacterStream* source) {
167 source_ = source; 167 source_ = source;
168 Init(); 168 Init();
169 // Skip initial whitespace allowing HTML comment ends just like 169 // Skip initial whitespace allowing HTML comment ends just like
170 // after a newline and scan first token. 170 // after a newline and scan first token.
171 has_line_terminator_before_next_ = true; 171 has_line_terminator_before_next_ = true;
172 has_multiline_comment_before_next_ = false;
172 SkipWhiteSpace(); 173 SkipWhiteSpace();
173 Scan(); 174 Scan();
174 } 175 }
175 }; 176 };
176 177
177 178
178 // Functions declared by allocation.h and implemented in both api.cc (for v8) 179 // Functions declared by allocation.h and implemented in both api.cc (for v8)
179 // or here (for a stand-alone preparser). 180 // or here (for a stand-alone preparser).
180 181
181 void FatalProcessOutOfMemory(const char* reason) { 182 void FatalProcessOutOfMemory(const char* reason) {
(...skipping 29 matching lines...) Expand all
211 return PreParserData(size, data); 212 return PreParserData(size, data);
212 } 213 }
213 214
214 } // namespace v8. 215 } // namespace v8.
215 216
216 217
217 // Used by ASSERT macros and other immediate exits. 218 // Used by ASSERT macros and other immediate exits.
218 extern "C" void V8_Fatal(const char* file, int line, const char* format, ...) { 219 extern "C" void V8_Fatal(const char* file, int line, const char* format, ...) {
219 exit(EXIT_FAILURE); 220 exit(EXIT_FAILURE);
220 } 221 }
OLDNEW
« no previous file with comments | « src/preparser.cc ('k') | src/scanner.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698