JavaScript / TypeScript is adding two new operators: the null
propagating operator ?. and the nullish coalescing operator ??.
const x = foo ?? 'default'; const z = foo?.bar?.baz;
This change adds support to lex and format both.
Paths
| Differential D69971
clang-format: [JS] support null operators. ClosedPublic Authored by mprobst on Nov 7 2019, 2:49 PM.
Details
Summary JavaScript / TypeScript is adding two new operators: the null const x = foo ?? 'default'; const z = foo?.bar?.baz; This change adds support to lex and format both.
Diff Detail
Event TimelineThis revision is now accepted and ready to land.Nov 7 2019, 3:30 PM Closed by commit rGa7638d384983: clang-format: [JS] support null operators. (authored by mprobst). · Explain WhyNov 11 2019, 7:36 AM This revision was automatically updated to reflect the committed changes.
Revision Contents
Diff 228693 clang/lib/Format/FormatToken.h
clang/lib/Format/FormatTokenLexer.cpp
clang/unittests/Format/FormatTestJS.cpp
|