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 359 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
370 const char* name_opt) { | 370 const char* name_opt) { |
371 log_->LogMessage(start_pos, end_pos, type, name_opt); | 371 log_->LogMessage(start_pos, end_pos, type, name_opt); |
372 } | 372 } |
373 | 373 |
374 void CheckOctalLiteral(int beg_pos, int end_pos, bool* ok); | 374 void CheckOctalLiteral(int beg_pos, int end_pos, bool* ok); |
375 | 375 |
376 // All ParseXXX functions take as the last argument an *ok parameter | 376 // All ParseXXX functions take as the last argument an *ok parameter |
377 // which is set to false if parsing failed; it is unchanged otherwise. | 377 // which is set to false if parsing failed; it is unchanged otherwise. |
378 // By making the 'exception handling' explicit, we are forced to check | 378 // By making the 'exception handling' explicit, we are forced to check |
379 // for failure at the call sites. | 379 // for failure at the call sites. |
| 380 Statement ParseSourceElement(bool* ok); |
380 SourceElements ParseSourceElements(int end_token, bool* ok); | 381 SourceElements ParseSourceElements(int end_token, bool* ok); |
381 Statement ParseStatement(bool* ok); | 382 Statement ParseStatement(bool* ok); |
382 Statement ParseFunctionDeclaration(bool* ok); | 383 Statement ParseFunctionDeclaration(bool* ok); |
383 Statement ParseBlock(bool* ok); | 384 Statement ParseBlock(bool* ok); |
384 Statement ParseVariableStatement(bool* ok); | 385 Statement ParseVariableStatement(bool accept_LET, bool* ok); |
385 Statement ParseVariableDeclarations(bool accept_IN, int* num_decl, bool* ok); | 386 Statement ParseVariableDeclarations(bool accept_LET, bool accept_IN, |
| 387 int* num_decl, bool* ok); |
386 Statement ParseExpressionOrLabelledStatement(bool* ok); | 388 Statement ParseExpressionOrLabelledStatement(bool* ok); |
387 Statement ParseIfStatement(bool* ok); | 389 Statement ParseIfStatement(bool* ok); |
388 Statement ParseContinueStatement(bool* ok); | 390 Statement ParseContinueStatement(bool* ok); |
389 Statement ParseBreakStatement(bool* ok); | 391 Statement ParseBreakStatement(bool* ok); |
390 Statement ParseReturnStatement(bool* ok); | 392 Statement ParseReturnStatement(bool* ok); |
391 Statement ParseWithStatement(bool* ok); | 393 Statement ParseWithStatement(bool* ok); |
392 Statement ParseSwitchStatement(bool* ok); | 394 Statement ParseSwitchStatement(bool* ok); |
393 Statement ParseDoWhileStatement(bool* ok); | 395 Statement ParseDoWhileStatement(bool* ok); |
394 Statement ParseWhileStatement(bool* ok); | 396 Statement ParseWhileStatement(bool* ok); |
395 Statement ParseForStatement(bool* ok); | 397 Statement ParseForStatement(bool* ok); |
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
493 uintptr_t stack_limit_; | 495 uintptr_t stack_limit_; |
494 i::Scanner::Location strict_mode_violation_location_; | 496 i::Scanner::Location strict_mode_violation_location_; |
495 const char* strict_mode_violation_type_; | 497 const char* strict_mode_violation_type_; |
496 bool stack_overflow_; | 498 bool stack_overflow_; |
497 bool allow_lazy_; | 499 bool allow_lazy_; |
498 bool parenthesized_function_; | 500 bool parenthesized_function_; |
499 }; | 501 }; |
500 } } // v8::preparser | 502 } } // v8::preparser |
501 | 503 |
502 #endif // V8_PREPARSER_H | 504 #endif // V8_PREPARSER_H |
OLD | NEW |