OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 562 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
573 } | 573 } |
574 | 574 |
575 // Check if the given string is 'eval' or 'arguments'. | 575 // Check if the given string is 'eval' or 'arguments'. |
576 bool IsEvalOrArguments(Handle<String> string); | 576 bool IsEvalOrArguments(Handle<String> string); |
577 | 577 |
578 // All ParseXXX functions take as the last argument an *ok parameter | 578 // All ParseXXX functions take as the last argument an *ok parameter |
579 // which is set to false if parsing failed; it is unchanged otherwise. | 579 // which is set to false if parsing failed; it is unchanged otherwise. |
580 // By making the 'exception handling' explicit, we are forced to check | 580 // By making the 'exception handling' explicit, we are forced to check |
581 // for failure at the call sites. | 581 // for failure at the call sites. |
582 void* ParseSourceElements(ZoneList<Statement*>* processor, | 582 void* ParseSourceElements(ZoneList<Statement*>* processor, |
583 int end_token, bool* ok); | 583 int end_token, bool is_eval, bool* ok); |
584 Statement* ParseModuleElement(ZoneStringList* labels, bool* ok); | 584 Statement* ParseModuleElement(ZoneStringList* labels, bool* ok); |
585 Block* ParseModuleDeclaration(ZoneStringList* names, bool* ok); | 585 Block* ParseModuleDeclaration(ZoneStringList* names, bool* ok); |
586 Module* ParseModule(bool* ok); | 586 Module* ParseModule(bool* ok); |
587 Module* ParseModuleLiteral(bool* ok); | 587 Module* ParseModuleLiteral(bool* ok); |
588 Module* ParseModulePath(bool* ok); | 588 Module* ParseModulePath(bool* ok); |
589 Module* ParseModuleVariable(bool* ok); | 589 Module* ParseModuleVariable(bool* ok); |
590 Module* ParseModuleUrl(bool* ok); | 590 Module* ParseModuleUrl(bool* ok); |
591 Module* ParseModuleSpecifier(bool* ok); | 591 Module* ParseModuleSpecifier(bool* ok); |
592 Block* ParseImportDeclaration(bool* ok); | 592 Block* ParseImportDeclaration(bool* ok); |
593 Statement* ParseExportDeclaration(bool* ok); | 593 Statement* ParseExportDeclaration(bool* ok); |
(...skipping 271 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
865 private: | 865 private: |
866 static const int kTypeSlot = 0; | 866 static const int kTypeSlot = 0; |
867 static const int kElementsSlot = 1; | 867 static const int kElementsSlot = 1; |
868 | 868 |
869 DISALLOW_IMPLICIT_CONSTRUCTORS(CompileTimeValue); | 869 DISALLOW_IMPLICIT_CONSTRUCTORS(CompileTimeValue); |
870 }; | 870 }; |
871 | 871 |
872 } } // namespace v8::internal | 872 } } // namespace v8::internal |
873 | 873 |
874 #endif // V8_PARSER_H_ | 874 #endif // V8_PARSER_H_ |
OLD | NEW |