| OLD | NEW |
| 1 #include "lexer/even-more-experimental-scanner.h" | 1 #include "lexer/even-more-experimental-scanner.h" |
| 2 | 2 |
| 3 | 3 |
| 4 {# TODO implement CLASS checks #} | 4 {# TODO implement CLASS checks #} |
| 5 {%- macro do_key(key) -%} | 5 {%- macro do_key(key) -%} |
| 6 {%- for r in key.range_iter() -%} | 6 {%- for r in key.range_iter() -%} |
| 7 {%- if not loop.first %} || {% endif -%} | 7 {%- if not loop.first %} || {% endif -%} |
| 8 {%- if r[0] == 'LATIN_1' -%} | 8 {%- if r[0] == 'LATIN_1' -%} |
| 9 {%- if r[1][0] == r[1][1] -%} | 9 {%- if r[1][0] == r[1][1] -%} |
| 10 yych == {{r[1][0]}} | 10 yych == {{r[1][0]}} |
| (...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 112 | 112 |
| 113 #define PUSH_LINE_TERMINATOR(s) { \ | 113 #define PUSH_LINE_TERMINATOR(s) { \ |
| 114 start_ = cursor_; \ | 114 start_ = cursor_; \ |
| 115 just_seen_line_terminator_ = true; \ | 115 just_seen_line_terminator_ = true; \ |
| 116 } | 116 } |
| 117 | 117 |
| 118 #define FORWARD() { \ | 118 #define FORWARD() { \ |
| 119 yych = *(++cursor_); \ | 119 yych = *(++cursor_); \ |
| 120 } | 120 } |
| 121 | 121 |
| 122 #define BACKWARD() { \ |
| 123 yych = *(--cursor_); \ |
| 124 } |
| 125 |
| 122 #define SKIP() { \ | 126 #define SKIP() { \ |
| 123 start_ = cursor_; \ | 127 start_ = cursor_; \ |
| 124 } | 128 } |
| 125 | 129 |
| 126 namespace v8 { | 130 namespace v8 { |
| 127 namespace internal { | 131 namespace internal { |
| 128 Token::Value EvenMoreExperimentalScanner::Next(int* beg_pos_to_return, | 132 Token::Value EvenMoreExperimentalScanner::Next(int* beg_pos_to_return, |
| 129 int* end_pos_to_return) { | 133 int* end_pos_to_return) { |
| 130 // Setup environment. | 134 // Setup environment. |
| 131 YYCTYPE yych = *cursor_; | 135 YYCTYPE yych = *cursor_; |
| (...skipping 12 matching lines...) Expand all Loading... |
| 144 {% endif -%} | 148 {% endif -%} |
| 145 {{dispatch_action(default_action[0], default_action[1])}} | 149 {{dispatch_action(default_action[0], default_action[1])}} |
| 146 FORWARD(); | 150 FORWARD(); |
| 147 goto code_start; | 151 goto code_start; |
| 148 | 152 |
| 149 fell_through: | 153 fell_through: |
| 150 CHECK(false); | 154 CHECK(false); |
| 151 } | 155 } |
| 152 } } | 156 } } |
| 153 | 157 |
| OLD | NEW |