]> granicus.if.org Git - clang/commit
[clang-format] Recognize ECMAScript module .mjs as JavaScript
authorFangrui Song <maskray@google.com>
Fri, 23 Aug 2019 04:46:01 +0000 (04:46 +0000)
committerFangrui Song <maskray@google.com>
Fri, 23 Aug 2019 04:46:01 +0000 (04:46 +0000)
commit6109274d457dcdd3a0aee021d854c543d2f5e52a
tree37074ec2d0d966a23c39169ef0c23cdea3d20e33
parent472c755e9d89617dd845445fdd34cb49700b3b20
[clang-format] Recognize ECMAScript module .mjs as JavaScript

PR43085.

Recognize .mjs files as JavaScript. .mjs is the extension for ECMAScript modules.
A specific extension (and associated content type javascript/esm) is
introduced to differentiate it from CommonJS modules and solve some
interoperability problems.

Differential Revision: https://reviews.llvm.org/D66584
Patch by Fergal Daly

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@369732 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Format/Format.cpp