[PATCH] Added LanguageStandard::LS_JavaScript to gate all JS-specific parsing.

Alexander Kornienko alexfh at google.com
Fri Nov 29 06:01:49 PST 2013


  Here are the changes in this patch:
    * Removed "Language: Any" option from configuration files.
    * Instead, now there may be at most one "default" section with no "Language: "
      value, which will be used as the set of default options for all languages.
      It can only be the first one in the .clang-format file.
    * If a configuration with specified language is present, it can override some
      (or all) of the options from the "default" section.
    * Added more tests.


  An example of the new configuration format:

  ---
  BasedOnStyle: LLVM
  ColumnLimit: 120
  UseTab: true
  ---
  Language: Cpp
  IndentWidth: 4
  ---
  Language: JavaScript
  ColumnLimit: 123
  IndentWidth: 3
  ...

  Here, the style for JavaScript will have UseTab=true, ColumnLimit=123,
  IndentWidth=3, and all other options taken from the predefined LLVM style.

Hi djasper, klimek,

http://llvm-reviews.chandlerc.com/D2242

CHANGE SINCE LAST DIFF
  http://llvm-reviews.chandlerc.com/D2242?vs=5816&id=5824#toc

Files:
  include/clang/Format/Format.h
  lib/Format/Format.cpp
  test/Format/language-detection.cpp
  unittests/Format/FormatTest.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D2242.7.patch
Type: text/x-patch
Size: 17796 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20131129/fefe5306/attachment.bin>


More information about the cfe-commits mailing list