- 
                Notifications
    You must be signed in to change notification settings 
- Fork 1.2k
JsParseModuleSource
        Richard edited this page Feb 23, 2018 
        ·
        1 revision
      
    Parse the source for an ES module
CHAKRA_API
JsParseModuleSource(
    _In_ JsModuleRecord requestModule,
    _In_ JsSourceContext sourceContext,
    _In_ BYTE* script,
    _In_ unsigned int scriptLength,
    _In_ JsParseModuleSourceFlags sourceFlag,
    _Outptr_result_maybenull_ JsValueRef* exceptionValueRef);
- requestModule: The ModuleRecord being parsed.
- sourceContext: A cookie identifying the script that can be used by debuggable script contexts.
- script: The source script to be parsed, but not executed in this code.
- scriptLength: The length of sourceText in bytes. As the input might contain a embedded null.
- sourceFlag: The type of the source code passed in. It could be utf16 or utf8 at this time.
- exceptionValueRef: The error object if there is a ParseError.
The code JsNoError if the operation succeeded, a failure code otherwise.
This API is experimental and may have breaking change later. This is basically ParseModule operation in ES6 spec. It is slightly different in that: a) The ModuleRecord was initialized earlier, and passed in as an argument. b) This includes a check to see if the module being Parsed is the last module in the dependency tree. If it is it automatically triggers Module Instantiation.
- Architecture Overview
- Building ChakraCore
- ChakraCore Code Structure
- Contributor Guidance
- Engineering Notes
- Embedding ChakraCore
- Testing ChakraCore
- Getting ChakraCore binaries
- Label Glossary
- Resources
- Roadmap / Release Notes
Want to contribute to this Wiki? Fork it and send a pull request!