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

Side by Side Diff: src/parser.h

Issue 19300002: ES6: Add support for explicit octal and binary integer literals (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Fix long lines Created 7 years, 5 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/flag-definitions.h ('k') | 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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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 420 matching lines...) Expand 10 before | Expand all | Expand 10 after
431 delete reusable_preparser_; 431 delete reusable_preparser_;
432 reusable_preparser_ = NULL; 432 reusable_preparser_ = NULL;
433 } 433 }
434 434
435 bool allow_natives_syntax() const { return allow_natives_syntax_; } 435 bool allow_natives_syntax() const { return allow_natives_syntax_; }
436 bool allow_lazy() const { return allow_lazy_; } 436 bool allow_lazy() const { return allow_lazy_; }
437 bool allow_modules() { return scanner().HarmonyModules(); } 437 bool allow_modules() { return scanner().HarmonyModules(); }
438 bool allow_harmony_scoping() { return scanner().HarmonyScoping(); } 438 bool allow_harmony_scoping() { return scanner().HarmonyScoping(); }
439 bool allow_generators() const { return allow_generators_; } 439 bool allow_generators() const { return allow_generators_; }
440 bool allow_for_of() const { return allow_for_of_; } 440 bool allow_for_of() const { return allow_for_of_; }
441 bool allow_harmony_numeric_literals() {
442 return scanner().HarmonyNumericLiterals();
443 }
441 444
442 void set_allow_natives_syntax(bool allow) { allow_natives_syntax_ = allow; } 445 void set_allow_natives_syntax(bool allow) { allow_natives_syntax_ = allow; }
443 void set_allow_lazy(bool allow) { allow_lazy_ = allow; } 446 void set_allow_lazy(bool allow) { allow_lazy_ = allow; }
444 void set_allow_modules(bool allow) { scanner().SetHarmonyModules(allow); } 447 void set_allow_modules(bool allow) { scanner().SetHarmonyModules(allow); }
445 void set_allow_harmony_scoping(bool allow) { 448 void set_allow_harmony_scoping(bool allow) {
446 scanner().SetHarmonyScoping(allow); 449 scanner().SetHarmonyScoping(allow);
447 } 450 }
448 void set_allow_generators(bool allow) { allow_generators_ = allow; } 451 void set_allow_generators(bool allow) { allow_generators_ = allow; }
449 void set_allow_for_of(bool allow) { allow_for_of_ = allow; } 452 void set_allow_for_of(bool allow) { allow_for_of_ = allow; }
453 void set_allow_harmony_numeric_literals(bool allow) {
454 scanner().SetHarmonyNumericLiterals(allow);
455 }
450 456
451 // Parses the source code represented by the compilation info and sets its 457 // Parses the source code represented by the compilation info and sets its
452 // function literal. Returns false (and deallocates any allocated AST 458 // function literal. Returns false (and deallocates any allocated AST
453 // nodes) if parsing failed. 459 // nodes) if parsing failed.
454 static bool Parse(CompilationInfo* info) { return Parser(info).Parse(); } 460 static bool Parse(CompilationInfo* info) { return Parser(info).Parse(); }
455 bool Parse(); 461 bool Parse();
456 462
457 // Returns NULL if parsing failed. 463 // Returns NULL if parsing failed.
458 FunctionLiteral* ParseProgram(); 464 FunctionLiteral* ParseProgram();
459 465
(...skipping 438 matching lines...) Expand 10 before | Expand all | Expand 10 after
898 private: 904 private:
899 static const int kLiteralTypeSlot = 0; 905 static const int kLiteralTypeSlot = 0;
900 static const int kElementsSlot = 1; 906 static const int kElementsSlot = 1;
901 907
902 DISALLOW_IMPLICIT_CONSTRUCTORS(CompileTimeValue); 908 DISALLOW_IMPLICIT_CONSTRUCTORS(CompileTimeValue);
903 }; 909 };
904 910
905 } } // namespace v8::internal 911 } } // namespace v8::internal
906 912
907 #endif // V8_PARSER_H_ 913 #endif // V8_PARSER_H_
OLDNEW
« no previous file with comments | « src/flag-definitions.h ('k') | src/parser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698