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

Side by Side Diff: src/scanner.h

Issue 12646003: Add parser support for generators. (Closed) Base URL: git://github.com/v8/v8.git@bleeding_edge
Patch Set: Fix bad initialization list in last preparser commit Created 7 years, 8 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
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 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 // parsers to signify their (initial) mode of operation. 46 // parsers to signify their (initial) mode of operation.
47 enum ParsingFlags { 47 enum ParsingFlags {
48 kNoParsingFlags = 0, 48 kNoParsingFlags = 0,
49 // Embed LanguageMode values in parsing flags, i.e., equivalent to: 49 // Embed LanguageMode values in parsing flags, i.e., equivalent to:
50 // CLASSIC_MODE = 0, 50 // CLASSIC_MODE = 0,
51 // STRICT_MODE, 51 // STRICT_MODE,
52 // EXTENDED_MODE, 52 // EXTENDED_MODE,
53 kLanguageModeMask = 0x03, 53 kLanguageModeMask = 0x03,
54 kAllowLazy = 0x04, 54 kAllowLazy = 0x04,
55 kAllowNativesSyntax = 0x08, 55 kAllowNativesSyntax = 0x08,
56 kAllowModules = 0x10 56 kAllowModules = 0x10,
57 kAllowGenerators = 0x20
57 }; 58 };
58 59
59 STATIC_ASSERT((kLanguageModeMask & CLASSIC_MODE) == CLASSIC_MODE); 60 STATIC_ASSERT((kLanguageModeMask & CLASSIC_MODE) == CLASSIC_MODE);
60 STATIC_ASSERT((kLanguageModeMask & STRICT_MODE) == STRICT_MODE); 61 STATIC_ASSERT((kLanguageModeMask & STRICT_MODE) == STRICT_MODE);
61 STATIC_ASSERT((kLanguageModeMask & EXTENDED_MODE) == EXTENDED_MODE); 62 STATIC_ASSERT((kLanguageModeMask & EXTENDED_MODE) == EXTENDED_MODE);
62 63
63 64
64 // Returns the value (0 .. 15) of a hexadecimal character c. 65 // Returns the value (0 .. 15) of a hexadecimal character c.
65 // If c is not a legal hexadecimal character, returns a value < 0. 66 // If c is not a legal hexadecimal character, returns a value < 0.
66 inline int HexValue(uc32 c) { 67 inline int HexValue(uc32 c) {
(...skipping 494 matching lines...) Expand 10 before | Expand all | Expand 10 after
561 bool has_multiline_comment_before_next_; 562 bool has_multiline_comment_before_next_;
562 // Whether we scan 'let' as a keyword for harmony block-scoped let bindings. 563 // Whether we scan 'let' as a keyword for harmony block-scoped let bindings.
563 bool harmony_scoping_; 564 bool harmony_scoping_;
564 // Whether we scan 'module', 'import', 'export' as keywords. 565 // Whether we scan 'module', 'import', 'export' as keywords.
565 bool harmony_modules_; 566 bool harmony_modules_;
566 }; 567 };
567 568
568 } } // namespace v8::internal 569 } } // namespace v8::internal
569 570
570 #endif // V8_SCANNER_H_ 571 #endif // V8_SCANNER_H_
OLDNEW
« no previous file with comments | « src/prettyprinter.cc ('k') | src/scanner.cc » ('j') | test/mjsunit/harmony/generators-parsing.js » ('J')

Powered by Google App Engine
This is Rietveld 408576698