| OLD | NEW |
| 1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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 16 matching lines...) Expand all Loading... |
| 27 | 27 |
| 28 #ifndef V8_LEXER_EVEN_MORE_EXPERIMENTAL_SCANNER_H | 28 #ifndef V8_LEXER_EVEN_MORE_EXPERIMENTAL_SCANNER_H |
| 29 #define V8_LEXER_EVEN_MORE_EXPERIMENTAL_SCANNER_H | 29 #define V8_LEXER_EVEN_MORE_EXPERIMENTAL_SCANNER_H |
| 30 | 30 |
| 31 #include "token.h" | 31 #include "token.h" |
| 32 #include "flags.h" | 32 #include "flags.h" |
| 33 #include "v8stdint.h" | 33 #include "v8stdint.h" |
| 34 | 34 |
| 35 #define YYCTYPE uint8_t | 35 #define YYCTYPE uint8_t |
| 36 | 36 |
| 37 #define PUSH_TOKEN(T) { \ | |
| 38 send(T); \ | |
| 39 start_ = cursor_; \ | |
| 40 just_seen_line_terminator_ = false; \ | |
| 41 } | |
| 42 #define PUSH_LINE_TERMINATOR(s) { \ | |
| 43 start_ = cursor_; \ | |
| 44 just_seen_line_terminator_ = true; \ | |
| 45 } | |
| 46 #define FORWARD() { \ | |
| 47 yych = *(++cursor_); \ | |
| 48 } | |
| 49 #define SKIP() { \ | |
| 50 start_ = cursor_; \ | |
| 51 } | |
| 52 | |
| 53 namespace v8 { | 37 namespace v8 { |
| 54 namespace internal { | 38 namespace internal { |
| 55 | 39 |
| 56 class ExperimentalScanner; | 40 class ExperimentalScanner; |
| 57 class UnicodeCache; | 41 class UnicodeCache; |
| 58 | 42 |
| 59 class EvenMoreExperimentalScanner { | 43 class EvenMoreExperimentalScanner { |
| 60 public: | 44 public: |
| 61 explicit EvenMoreExperimentalScanner(ExperimentalScanner* sink, | 45 explicit EvenMoreExperimentalScanner(ExperimentalScanner* sink, |
| 62 UnicodeCache* unicode_cache); | 46 UnicodeCache* unicode_cache); |
| (...skipping 18 matching lines...) Expand all Loading... |
| 81 YYCTYPE* cursor_; | 65 YYCTYPE* cursor_; |
| 82 bool just_seen_line_terminator_; | 66 bool just_seen_line_terminator_; |
| 83 | 67 |
| 84 YYCTYPE yych; | 68 YYCTYPE yych; |
| 85 ExperimentalScanner* sink_; | 69 ExperimentalScanner* sink_; |
| 86 }; | 70 }; |
| 87 | 71 |
| 88 } } | 72 } } |
| 89 | 73 |
| 90 #endif // V8_LEXER_LEXER_H | 74 #endif // V8_LEXER_LEXER_H |
| OLD | NEW |