[PATCH] Added LanguageStandard::LS_JavaScript to gate all JS-specific parsing.
Daniel Jasper
djasper at google.com
Thu Nov 28 08:40:41 PST 2013
================
Comment at: lib/Format/Format.cpp:192
@@ +191,3 @@
+// When writing, the 0th element is ignored.
+// When reading, keys, that are not present in the serialized form, will be
+// copied from the 0th element of the vector.
----------------
Remove commas after "keys" and "form".
================
Comment at: lib/Format/Format.cpp:223
@@ -190,2 +222,3 @@
FormatStyle LLVMStyle;
+ LLVMStyle.Language= FormatStyle::LK_Cpp;
LLVMStyle.AccessModifierOffset = -2;
----------------
clang-format the file. There are several instances of missing spaces like this.
================
Comment at: lib/Format/Format.cpp:1042
@@ +1041,3 @@
+ if (tryMergeTokens(JSShiftEqual))
+ return;
+ }
----------------
That return will always confuse me for a second, but ok..
================
Comment at: include/clang/Format/Format.h:35
@@ +34,3 @@
+ /// the language, that the configuration targets. When passed to the
+ /// reformat() function, enables syntax features specific for the language.
+ enum LanguageKind {
----------------
nit: .. specific to ..
================
Comment at: include/clang/Format/Format.h:44
@@ +43,3 @@
+ /// function.
+ LK_Any
+ };
----------------
Could we just get rid of LK_Any and say that in the config file, you simply don't specify a language?
http://llvm-reviews.chandlerc.com/D2242
More information about the cfe-commits
mailing list