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

Side by Side Diff: src/parser.h

Issue 6355006: Make invalid break/continue statements an early syntax error. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge/build-ia32
Patch Set: Address review comments. Created 9 years, 11 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 | « no previous file | src/parser.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 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 412 matching lines...) Expand 10 before | Expand all | Expand 10 after
423 423
424 // Returns NULL if parsing failed. 424 // Returns NULL if parsing failed.
425 FunctionLiteral* ParseProgram(Handle<String> source, 425 FunctionLiteral* ParseProgram(Handle<String> source,
426 bool in_global_context); 426 bool in_global_context);
427 427
428 FunctionLiteral* ParseLazy(Handle<SharedFunctionInfo> info); 428 FunctionLiteral* ParseLazy(Handle<SharedFunctionInfo> info);
429 429
430 void ReportMessageAt(Scanner::Location loc, 430 void ReportMessageAt(Scanner::Location loc,
431 const char* message, 431 const char* message,
432 Vector<const char*> args); 432 Vector<const char*> args);
433 void ReportMessageAt(Scanner::Location loc,
434 const char* message,
435 Vector<Handle<String> > args);
433 436
434 protected: 437 protected:
435 FunctionLiteral* ParseLazy(Handle<SharedFunctionInfo> info, 438 FunctionLiteral* ParseLazy(Handle<SharedFunctionInfo> info,
436 UC16CharacterStream* source, 439 UC16CharacterStream* source,
437 ZoneScope* zone_scope); 440 ZoneScope* zone_scope);
438 enum Mode { 441 enum Mode {
439 PARSE_LAZILY, 442 PARSE_LAZILY,
440 PARSE_EAGERLY 443 PARSE_EAGERLY
441 }; 444 };
442 445
(...skipping 328 matching lines...) Expand 10 before | Expand all | Expand 10 after
771 Handle<Object> ReportUnexpectedToken() { return Handle<Object>::null(); } 774 Handle<Object> ReportUnexpectedToken() { return Handle<Object>::null(); }
772 // Converts the currently parsed literal to a JavaScript String. 775 // Converts the currently parsed literal to a JavaScript String.
773 Handle<String> GetString(); 776 Handle<String> GetString();
774 777
775 JsonScanner scanner_; 778 JsonScanner scanner_;
776 bool stack_overflow_; 779 bool stack_overflow_;
777 }; 780 };
778 } } // namespace v8::internal 781 } } // namespace v8::internal
779 782
780 #endif // V8_PARSER_H_ 783 #endif // V8_PARSER_H_
OLDNEW
« no previous file with comments | « no previous file | src/parser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698