fergald created this revision.
fergald added a reviewer: MaskRay.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.
PR43085.
This causes .mjs files to be treated as javascript. .mjs is the extension for
module-javascript. Module javascript is not compatible with non-module j
thakis accepted this revision.
thakis added a comment.
This revision is now accepted and ready to land.
Does clang-format format import and export lines in mjs files correctly?
Repository:
rC Clang
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D66584/new/
https://reviews.llvm.org/D665
fergald added a comment.
It seems to do the right thing. E.g.
https://crrev.com/c/1767284/5/third_party/blink/renderer/core/script/resources/layered_api/elements/virtual-scroller/visibility-manager.mjs
Repository:
rC Clang
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D66584/new/
htt
fergald added a comment.
I cannot commit this, please do so, if you're happy with it.
Repository:
rC Clang
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D66584/new/
https://reviews.llvm.org/D66584
___
cfe-commits mailing list
cfe-commits@
MaskRay added a comment.
> module-javascript. Module javascript is not compatible with non-module java
> script as it uses the "export" and "import" keywords which are only legal in
> module-javascript.
java script -> JavaScript
module-javascript -> Module JavaScript?
Repository:
rC Clang
MaskRay added a comment.
> This causes .mjs files to be treated as javascript.
I think you meant .mjs was not recognized before but will be recognized as
JavaScript with this change.
Can you elaborate a bit why .mjs is so common that it justifies a clang-format
change?
Repository:
rC Clang
fergald added a comment.
"why .mjs is so common that it justifies a clang-format change?"
I don't have data but Module JS is the future, it's supported by all major
browsers for some time and also Node.js, it solves the problem of everything
being lumped into one namespace.
Why does it need a
MaskRay accepted this revision.
MaskRay added a comment.
Reading some materials online... I think this should be named ECMAScript module
(ECM), not JavaScript modules.. I can fix the description and commit for you.
Repository:
rC Clang
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D66
fergald added a comment.
Thanks, I'm happy with that description
Repository:
rC Clang
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D66584/new/
https://reviews.llvm.org/D66584
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https:
This revision was automatically updated to reflect the committed changes.
Closed by commit rL369732: [clang-format] Recognize ECMAScript module .mjs as
JavaScript (authored by MaskRay, committed by ).
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
Changed prior to commit:
10 matches
Mail list logo