OLD | NEW |
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 313 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
324 } | 324 } |
325 Vector<const uc16> literal_utf16_string() { | 325 Vector<const uc16> literal_utf16_string() { |
326 ASSERT_NOT_NULL(current_.literal_chars); | 326 ASSERT_NOT_NULL(current_.literal_chars); |
327 return current_.literal_chars->utf16_literal(); | 327 return current_.literal_chars->utf16_literal(); |
328 } | 328 } |
329 bool is_literal_ascii() { | 329 bool is_literal_ascii() { |
330 ASSERT_NOT_NULL(current_.literal_chars); | 330 ASSERT_NOT_NULL(current_.literal_chars); |
331 return current_.literal_chars->is_ascii(); | 331 return current_.literal_chars->is_ascii(); |
332 } | 332 } |
333 bool is_literal_contextual_keyword(Vector<const char> keyword) { | 333 bool is_literal_contextual_keyword(Vector<const char> keyword) { |
334 ASSERT_NOT_NULL(next_.literal_chars); | 334 ASSERT_NOT_NULL(current_.literal_chars); |
335 return current_.literal_chars->is_contextual_keyword(keyword); | 335 return current_.literal_chars->is_contextual_keyword(keyword); |
336 } | 336 } |
337 int literal_length() const { | 337 int literal_length() const { |
338 ASSERT_NOT_NULL(current_.literal_chars); | 338 ASSERT_NOT_NULL(current_.literal_chars); |
339 return current_.literal_chars->length(); | 339 return current_.literal_chars->length(); |
340 } | 340 } |
341 | 341 |
342 bool literal_contains_escapes() const { | 342 bool literal_contains_escapes() const { |
343 Location location = current_.location; | 343 Location location = current_.location; |
344 int source_length = (location.end_pos - location.beg_pos); | 344 int source_length = (location.end_pos - location.beg_pos); |
(...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
555 bool has_multiline_comment_before_next_; | 555 bool has_multiline_comment_before_next_; |
556 // Whether we scan 'let' as a keyword for harmony block-scoped let bindings. | 556 // Whether we scan 'let' as a keyword for harmony block-scoped let bindings. |
557 bool harmony_scoping_; | 557 bool harmony_scoping_; |
558 // Whether we scan 'module', 'import', 'export' as keywords. | 558 // Whether we scan 'module', 'import', 'export' as keywords. |
559 bool harmony_modules_; | 559 bool harmony_modules_; |
560 }; | 560 }; |
561 | 561 |
562 } } // namespace v8::internal | 562 } } // namespace v8::internal |
563 | 563 |
564 #endif // V8_SCANNER_H_ | 564 #endif // V8_SCANNER_H_ |
OLD | NEW |