llvm-project/clang/tools/clang-format
Daniel Jasper 23376259c0 clang-format: [JS] Support regex literals with trailing escaped slash.
Before:
  var regex = / a\//; int i;

After:
  var regex = /a\//;
  int i;

This required pushing the Lexer into its wrapper class and generating a
new one in this specific case. Otherwise, the sequence get lexed as a
//-comment. This is hacky, but I don't know a better way (short of
supporting regex literals in the Lexer).

Pushing the Lexer down seems to make all the call sites simpler.

llvm-svn: 217444
2014-09-09 14:37:39 +00:00
..
CMakeLists.txt Make clang's rewrite engine a core feature 2014-07-16 16:48:33 +00:00
ClangFormat.cpp clang-format: [JS] Support regex literals with trailing escaped slash. 2014-09-09 14:37:39 +00:00
Makefile Make clang's rewrite engine a core feature 2014-07-16 16:48:33 +00:00
clang-format-bbedit.applescript Basic clang-format integration for BBEdit. 2013-05-02 17:37:36 +00:00
clang-format-diff.py Use /usr/bin/env python instead of /usr/bin/python. 2014-09-02 20:59:13 +00:00
clang-format-sublime.py Py3k compat for clang-format Sublime Text extension. 2013-11-08 22:46:56 +00:00
clang-format.el clang-format: Add -assume-filename option for editor integrations. 2013-09-13 13:40:24 +00:00
clang-format.py clang-format: Fix vim-integration for empty files. 2014-05-22 11:37:05 +00:00
git-clang-format Use /usr/bin/env python instead of /usr/bin/python. 2014-09-02 20:59:13 +00:00