diff options
Diffstat (limited to 'clang/lib/Format/UnwrappedLineParser.cpp')
| -rw-r--r-- | clang/lib/Format/UnwrappedLineParser.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/clang/lib/Format/UnwrappedLineParser.cpp b/clang/lib/Format/UnwrappedLineParser.cpp index 56cad19277d..edb68a3d79c 100644 --- a/clang/lib/Format/UnwrappedLineParser.cpp +++ b/clang/lib/Format/UnwrappedLineParser.cpp @@ -1041,6 +1041,13 @@ void UnwrappedLineParser::parseParens() { if (FormatTok->Tok.is(tok::l_brace)) parseBracedList(); break; + case tok::identifier: + if (Style.Language == FormatStyle::LK_JavaScript && + FormatTok->TokenText == "function") + tryToParseJSFunction(); + else + nextToken(); + break; default: nextToken(); break; |

