OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef V8_PREPARSER_H | 5 #ifndef V8_PREPARSER_H |
6 #define V8_PREPARSER_H | 6 #define V8_PREPARSER_H |
7 | 7 |
8 #include "src/v8.h" | 8 #include "src/v8.h" |
9 | 9 |
10 #include "src/bailout-reason.h" | 10 #include "src/bailout-reason.h" |
(...skipping 1686 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1697 ReportMessage("unterminated_regexp"); | 1697 ReportMessage("unterminated_regexp"); |
1698 *ok = false; | 1698 *ok = false; |
1699 return Traits::EmptyExpression(); | 1699 return Traits::EmptyExpression(); |
1700 } | 1700 } |
1701 | 1701 |
1702 int literal_index = function_state_->NextMaterializedLiteralIndex(); | 1702 int literal_index = function_state_->NextMaterializedLiteralIndex(); |
1703 | 1703 |
1704 IdentifierT js_pattern = this->GetNextSymbol(scanner()); | 1704 IdentifierT js_pattern = this->GetNextSymbol(scanner()); |
1705 if (!scanner()->ScanRegExpFlags()) { | 1705 if (!scanner()->ScanRegExpFlags()) { |
1706 Next(); | 1706 Next(); |
1707 ReportMessage("invalid_regexp_flags"); | 1707 ReportMessage("malformed_regexp_flags"); |
1708 *ok = false; | 1708 *ok = false; |
1709 return Traits::EmptyExpression(); | 1709 return Traits::EmptyExpression(); |
1710 } | 1710 } |
1711 IdentifierT js_flags = this->GetNextSymbol(scanner()); | 1711 IdentifierT js_flags = this->GetNextSymbol(scanner()); |
1712 Next(); | 1712 Next(); |
1713 return factory()->NewRegExpLiteral(js_pattern, js_flags, literal_index, pos); | 1713 return factory()->NewRegExpLiteral(js_pattern, js_flags, literal_index, pos); |
1714 } | 1714 } |
1715 | 1715 |
1716 | 1716 |
1717 #define CHECK_OK ok); \ | 1717 #define CHECK_OK ok); \ |
(...skipping 1123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2841 DCHECK(IsAccessorAccessorConflict(old_type, type)); | 2841 DCHECK(IsAccessorAccessorConflict(old_type, type)); |
2842 // Both accessors of the same type. | 2842 // Both accessors of the same type. |
2843 parser()->ReportMessage("accessor_get_set"); | 2843 parser()->ReportMessage("accessor_get_set"); |
2844 } | 2844 } |
2845 *ok = false; | 2845 *ok = false; |
2846 } | 2846 } |
2847 } | 2847 } |
2848 } } // v8::internal | 2848 } } // v8::internal |
2849 | 2849 |
2850 #endif // V8_PREPARSER_H | 2850 #endif // V8_PREPARSER_H |
OLD | NEW |