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

Side by Side Diff: src/scanner.h

Issue 8404030: Version 3.7.1 (Closed) Base URL: http://v8.googlecode.com/svn/trunk/
Patch Set: Created 9 years, 1 month 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/runtime.js ('k') | src/scopeinfo.h » ('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 23 matching lines...) Expand all
34 #include "char-predicates.h" 34 #include "char-predicates.h"
35 #include "checks.h" 35 #include "checks.h"
36 #include "globals.h" 36 #include "globals.h"
37 #include "token.h" 37 #include "token.h"
38 #include "unicode-inl.h" 38 #include "unicode-inl.h"
39 #include "utils.h" 39 #include "utils.h"
40 40
41 namespace v8 { 41 namespace v8 {
42 namespace internal { 42 namespace internal {
43 43
44
45 // General collection of bit-flags that can be passed to scanners and
46 // parsers to signify their (initial) mode of operation.
47 enum ParsingFlags {
48 kNoParsingFlags = 0,
49 kAllowLazy = 1,
50 kAllowNativesSyntax = 2,
51 kHarmonyScoping = 4
52 };
53
54
44 // Returns the value (0 .. 15) of a hexadecimal character c. 55 // Returns the value (0 .. 15) of a hexadecimal character c.
45 // If c is not a legal hexadecimal character, returns a value < 0. 56 // If c is not a legal hexadecimal character, returns a value < 0.
46 inline int HexValue(uc32 c) { 57 inline int HexValue(uc32 c) {
47 c -= '0'; 58 c -= '0';
48 if (static_cast<unsigned>(c) <= 9) return c; 59 if (static_cast<unsigned>(c) <= 9) return c;
49 c = (c | 0x20) - ('a' - '0'); // detect 0x11..0x16 and 0x31..0x36. 60 c = (c | 0x20) - ('a' - '0'); // detect 0x11..0x16 and 0x31..0x36.
50 if (static_cast<unsigned>(c) <= 5) return c + 10; 61 if (static_cast<unsigned>(c) <= 5) return c + 10;
51 return -1; 62 return -1;
52 } 63 }
53 64
(...skipping 501 matching lines...) Expand 10 before | Expand all | Expand 10 after
555 // line-terminator after the current token, and before the next. 566 // line-terminator after the current token, and before the next.
556 bool has_multiline_comment_before_next_; 567 bool has_multiline_comment_before_next_;
557 // Whether we scan 'let' as a keyword for harmony block scoped 568 // Whether we scan 'let' as a keyword for harmony block scoped
558 // let bindings. 569 // let bindings.
559 bool harmony_scoping_; 570 bool harmony_scoping_;
560 }; 571 };
561 572
562 } } // namespace v8::internal 573 } } // namespace v8::internal
563 574
564 #endif // V8_SCANNER_H_ 575 #endif // V8_SCANNER_H_
OLDNEW
« no previous file with comments | « src/runtime.js ('k') | src/scopeinfo.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698