mirror of
https://github.com/Microsoft/vscode
synced 2024-08-28 13:29:44 +00:00
alignof and alignas keywords
alignof and alignas are official C++ keywords, further I moved one function definition from the C file to the C++ because it has caused wrong highlighting for C (friend and override are not C keywords). .H files are now also C++ file types.
This commit is contained in:
parent
0bf4c2ca6e
commit
9992e9fba8
|
@ -16,6 +16,7 @@
|
|||
<string>hh</string>
|
||||
<string>hpp</string>
|
||||
<string>h++</string>
|
||||
<string>H</string>
|
||||
</array>
|
||||
<key>firstLineMatch</key>
|
||||
<string>-\*- C\+\+ -\*-</string>
|
||||
|
@ -29,10 +30,6 @@
|
|||
<key>include</key>
|
||||
<string>#special_block</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>include</key>
|
||||
<string>source.c</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>match</key>
|
||||
<string>\b(friend|explicit|virtual)\b</string>
|
||||
|
@ -85,7 +82,7 @@
|
|||
</dict>
|
||||
<dict>
|
||||
<key>match</key>
|
||||
<string>\b(and|and_eq|bitand|bitor|compl|not|not_eq|or|or_eq|typeid|xor|xor_eq)\b</string>
|
||||
<string>\b(alignof|alignas|and|and_eq|bitand|bitor|compl|not|not_eq|or|or_eq|typeid|xor|xor_eq)\b</string>
|
||||
<key>name</key>
|
||||
<string>keyword.operator.c++</string>
|
||||
</dict>
|
||||
|
@ -97,7 +94,7 @@
|
|||
</dict>
|
||||
<dict>
|
||||
<key>match</key>
|
||||
<string>\b(constexpr|export|mutable|typename|thread_local|noexcept)\b</string>
|
||||
<string>\b(constexpr|export|mutable|typename|thread_local)\b</string>
|
||||
<key>name</key>
|
||||
<string>storage.modifier.c++</string>
|
||||
</dict>
|
||||
|
@ -185,6 +182,69 @@
|
|||
</dict>
|
||||
</array>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>begin</key>
|
||||
<string>(?x)
|
||||
(?: ^ # begin-of-line
|
||||
|
|
||||
(?: (?= \s ) (?<!else|new|return) (?<=\w) # or word + space before name
|
||||
| (?= \s*[A-Za-z_] ) (?<!&&) (?<=[*&>]) # or type modifier before name
|
||||
)
|
||||
)
|
||||
(\s*) (?!(while|for|do|if|else|switch|catch|enumerate|return|sizeof|[cr]?iterate)\s*\()
|
||||
(
|
||||
(?: [A-Za-z_][A-Za-z0-9_]*+ | :: )++ | # actual name
|
||||
(?: (?<=operator) (?: [-*&<>=+!]+ | \(\) | \[\] ) ) # if it is a C++ operator
|
||||
)
|
||||
\s*(?=\()</string>
|
||||
<key>beginCaptures</key>
|
||||
<dict>
|
||||
<key>1</key>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>punctuation.whitespace.function.leading.c</string>
|
||||
</dict>
|
||||
<key>3</key>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>entity.name.function.c</string>
|
||||
</dict>
|
||||
<key>4</key>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>punctuation.definition.parameters.c</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<key>end</key>
|
||||
<string>(?<=\})|(?=#)|(;)</string>
|
||||
<key>name</key>
|
||||
<string>meta.function.c++</string>
|
||||
<key>patterns</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>include</key>
|
||||
<string>#comments</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>include</key>
|
||||
<string>#parens</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>match</key>
|
||||
<string>\b(const|final|override|noexcept)\b</string>
|
||||
<key>name</key>
|
||||
<string>storage.modifier.$1.c++</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>include</key>
|
||||
<string>#block</string>
|
||||
</dict>
|
||||
</array>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>include</key>
|
||||
<string>source.c</string>
|
||||
</dict>
|
||||
</array>
|
||||
<key>repository</key>
|
||||
<dict>
|
||||
|
|
Loading…
Reference in a new issue