| 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 276 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 287 const Char* cursor_; | 287 const Char* cursor_; |
| 288 const Char* marker_; | 288 const Char* marker_; |
| 289 }; | 289 }; |
| 290 | 290 |
| 291 | 291 |
| 292 template<typename Char> | 292 template<typename Char> |
| 293 void ExperimentalScanner<Char>::SeekForward(int pos) { | 293 void ExperimentalScanner<Char>::SeekForward(int pos) { |
| 294 cursor_ = buffer_ + pos; | 294 cursor_ = buffer_ + pos; |
| 295 start_ = cursor_; | 295 start_ = cursor_; |
| 296 marker_ = cursor_; | 296 marker_ = cursor_; |
| 297 has_line_terminator_before_next_ = false; |
| 297 Scan(); // Fills in next_. | 298 Scan(); // Fills in next_. |
| 298 } | 299 } |
| 299 | 300 |
| 300 | 301 |
| 301 template<typename Char> | 302 template<typename Char> |
| 302 bool ExperimentalScanner<Char>::ScanRegExpPattern(bool seen_equal) { | 303 bool ExperimentalScanner<Char>::ScanRegExpPattern(bool seen_equal) { |
| 303 // Scan: ('/' | '/=') RegularExpressionBody '/' RegularExpressionFlags | 304 // Scan: ('/' | '/=') RegularExpressionBody '/' RegularExpressionFlags |
| 304 bool in_character_class = false; | 305 bool in_character_class = false; |
| 305 | 306 |
| 306 // Previous token is either '/' or '/=', in the second case, the | 307 // Previous token is either '/' or '/=', in the second case, the |
| (...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 388 i++; | 389 i++; |
| 389 } | 390 } |
| 390 } | 391 } |
| 391 return i == 6; | 392 return i == 6; |
| 392 } | 393 } |
| 393 | 394 |
| 394 | 395 |
| 395 } } | 396 } } |
| 396 | 397 |
| 397 #endif // V8_LEXER_EXPERIMENTAL_SCANNER_H | 398 #endif // V8_LEXER_EXPERIMENTAL_SCANNER_H |
| OLD | NEW |