Bug 187694 - [GLIB] Add jsc_context_check_syntax() to GLib API
Summary: [GLIB] Add jsc_context_check_syntax() to GLib API
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
Keywords: Gtk, InRadar
Depends on:
Reported: 2018-07-16 05:38 PDT by Carlos Garcia Campos
Modified: 2018-07-19 03:18 PDT (History)
9 users (show)

See Also:

Patch (8.23 KB, patch)
2018-07-16 05:39 PDT, Carlos Garcia Campos
ysuzuki: review-
Details | Formatted Diff | Diff
Updated patch (13.34 KB, patch)
2018-07-18 05:40 PDT, Carlos Garcia Campos
ysuzuki: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Carlos Garcia Campos 2018-07-16 05:38:03 PDT
A wrapper for JSCheckScriptSyntax to be able to check for syntax errors without actually evaluating the code.
Comment 1 Carlos Garcia Campos 2018-07-16 05:39:38 PDT
Created attachment 345090 [details]
Comment 2 Yusuke Suzuki 2018-07-16 07:00:11 PDT
Comment on attachment 345090 [details]

Looks good. But, I think this API does not consider about ES6 modules.
Module and Script have different syntax elements. For example, `import` declaration is not allowed under Script mode.
We should take an argument indicating the mode.
Comment 3 Carlos Garcia Campos 2018-07-18 05:40:26 PDT
Created attachment 345238 [details]
Updated patch
Comment 4 Yusuke Suzuki 2018-07-18 05:48:24 PDT
Comment on attachment 345238 [details]
Updated patch

Comment 5 Carlos Garcia Campos 2018-07-18 05:54:56 PDT
Committed r233911: <https://trac.webkit.org/changeset/233911>
Comment 6 Radar WebKit Bug Importer 2018-07-18 05:55:21 PDT