Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

JsParseModuleSource

Richard edited this pageFeb 23, 2018 ·1 revision

Parse the source for an ES module

Syntax

CHAKRA_APIJsParseModuleSource(    _In_ JsModuleRecord requestModule,    _In_ JsSourceContext sourceContext,    _In_ BYTE* script,    _In_ unsigned int scriptLength,    _In_ JsParseModuleSourceFlags sourceFlag,    _Outptr_result_maybenull_ JsValueRef* exceptionValueRef);

Parameters

  • 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.

Return Value

The codeJsNoError if the operation succeeded, a failure code otherwise.

Remarks

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.

Want to contribute to this Wiki?

Clone this wiki locally

[8]ページ先頭

©2009-2025 Movatter.jp