| 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_PARSER_H_ | 5 #ifndef V8_PARSER_H_ |
| 6 #define V8_PARSER_H_ | 6 #define V8_PARSER_H_ |
| 7 | 7 |
| 8 #include "src/allocation.h" | 8 #include "src/allocation.h" |
| 9 #include "src/ast.h" | 9 #include "src/ast.h" |
| 10 #include "src/compiler.h" // For CachedDataMode | 10 #include "src/compiler.h" // For CachedDataMode |
| (...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 233 // out parameters. | 233 // out parameters. |
| 234 bool ParseIntervalQuantifier(int* min_out, int* max_out); | 234 bool ParseIntervalQuantifier(int* min_out, int* max_out); |
| 235 | 235 |
| 236 // Parses and returns a single escaped character. The character | 236 // Parses and returns a single escaped character. The character |
| 237 // must not be 'b' or 'B' since they are usually handle specially. | 237 // must not be 'b' or 'B' since they are usually handle specially. |
| 238 uc32 ParseClassCharacterEscape(); | 238 uc32 ParseClassCharacterEscape(); |
| 239 | 239 |
| 240 // Checks whether the following is a length-digit hexadecimal number, | 240 // Checks whether the following is a length-digit hexadecimal number, |
| 241 // and sets the value if it is. | 241 // and sets the value if it is. |
| 242 bool ParseHexEscape(int length, uc32* value); | 242 bool ParseHexEscape(int length, uc32* value); |
| 243 // Like ParseHexEscape, but the length of the number is unlimited; the value |
| 244 // must be at most max_value. |
| 245 bool ParseUnlimitedLengthHexEscape(int max_value, uc32* value); |
| 246 bool ParseUnicodeEscape(uc32* value); |
| 243 | 247 |
| 244 uc32 ParseOctalLiteral(); | 248 uc32 ParseOctalLiteral(); |
| 245 | 249 |
| 246 // Tries to parse the input as a back reference. If successful it | 250 // Tries to parse the input as a back reference. If successful it |
| 247 // stores the result in the output parameter and returns true. If | 251 // stores the result in the output parameter and returns true. If |
| 248 // it fails it will push back the characters read so the same characters | 252 // it fails it will push back the characters read so the same characters |
| 249 // can be reparsed. | 253 // can be reparsed. |
| 250 bool ParseBackReferenceIndex(int* index_out); | 254 bool ParseBackReferenceIndex(int* index_out); |
| 251 | 255 |
| 252 CharacterRange ParseClassAtom(uc16* char_class); | 256 CharacterRange ParseClassAtom(uc16* char_class); |
| (...skipping 669 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 922 private: | 926 private: |
| 923 static const int kLiteralTypeSlot = 0; | 927 static const int kLiteralTypeSlot = 0; |
| 924 static const int kElementsSlot = 1; | 928 static const int kElementsSlot = 1; |
| 925 | 929 |
| 926 DISALLOW_IMPLICIT_CONSTRUCTORS(CompileTimeValue); | 930 DISALLOW_IMPLICIT_CONSTRUCTORS(CompileTimeValue); |
| 927 }; | 931 }; |
| 928 | 932 |
| 929 } } // namespace v8::internal | 933 } } // namespace v8::internal |
| 930 | 934 |
| 931 #endif // V8_PARSER_H_ | 935 #endif // V8_PARSER_H_ |
| OLD | NEW |