]> granicus.if.org Git - clang/commit
clang-format: [JS] Support shebang lines on the very first line.
authorMartin Probst <martin@probst.io>
Sun, 29 May 2016 14:41:36 +0000 (14:41 +0000)
committerMartin Probst <martin@probst.io>
Sun, 29 May 2016 14:41:36 +0000 (14:41 +0000)
commit513a0b11fd23965b29b8a0e3d1edc84c5a040ca3
treef3798e0dd476302bbbdbdd1fdcbfe6c97ece1e01
parent03885e6c797811d0eb54d8375ed4859f83b830cf
clang-format: [JS] Support shebang lines on the very first line.

Summary:
Shebang lines (`#!/bin/blah`) can be used in JavaScript scripts to indicate
they should be run using e.g. node. This change treats # lines on the first line
as line comments.

Reviewers: djasper

Subscribers: klimek, cfe-commits

Differential Revision: http://reviews.llvm.org/D20632

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@271185 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Format/FormatToken.h
lib/Format/TokenAnnotator.cpp
unittests/Format/FormatTestJS.cpp