Merge remote-tracking branch 'fsub/c-family'

This commit is contained in:
Maxime Coste 2017-11-09 10:09:58 +08:00
commit a131edb9b3

View File

@ -154,9 +154,11 @@ define-command -hidden c-family-insert-on-newline %[ evaluate-commands -draft %[
add-highlighter shared/c/code regex %{\b-?(0x[0-9a-fA-F]+|\d+)[fdiu]?|'((\\.)?|[^'\\])'} 0:value add-highlighter shared/c/code regex %{\b-?(0x[0-9a-fA-F]+|\d+)[fdiu]?|'((\\.)?|[^'\\])'} 0:value
%sh{ %sh{
# Grammar # Grammar
keywords="while|for|if|else|do|switch|case|default|goto|asm|break|continue|return|sizeof" keywords="asm|break|case|continue|default|do|else|for|goto|if|return"
attributes="const|auto|register|inline|static|volatile|struct|enum|union|typedef|extern|restrict" keywords="${keywords}|sizeof|switch|while"
types="void|char|short|int|long|signed|unsigned|float|double|size_t" attributes="auto|const|enum|extern|inline|register|restrict|static|struct"
attributes="${attributes}|typedef|union|volatile"
types="char|double|float|int|long|short|signed|size_t|unsigned|void"
values="NULL" values="NULL"
# Add the language's grammar to the static completion list # Add the language's grammar to the static completion list
@ -178,17 +180,21 @@ add-highlighter shared/cpp/code regex %{\b-?(0x[0-9a-fA-F]+|\d+)[fdiu]?|'((\\.)?
%sh{ %sh{
# Grammar # Grammar
keywords="while|for|if|else|do|switch|case|default|goto|asm|break|continue" keywords="alignas|alignof|and|and_eq|asm|bitand|bitor|break|case|catch"
keywords="${keywords}|return|using|try|catch|throw|new|delete|and|and_eq|or" keywords="${keywords}|compl|const_cast|continue|decltype|default|delete"
keywords="${keywords}|or_eq|not|operator|explicit|reinterpret_cast" keywords="${keywords}|do|dynamic_cast|else|explicit|for|goto|if|new|not"
keywords="${keywords}|const_cast|static_cast|dynamic_cast|sizeof|alignof" keywords="${keywords}|not_eq|operator|or|or_eq|reinterpret_cast|return"
keywords="${keywords}|alignas|decltype" keywords="${keywords}|sizeof|static_assert|static_cast|switch|throw|try"
attributes="const|constexpr|mutable|auto|noexcept|namespace|inline|static" keywords="${keywords}|typeid|using|while|xor|xor_eq"
attributes="${attributes}|volatile|class|struct|enum|union|public|protected" attributes="auto|class|const|constexpr|enum|extern|final|friend|inline"
attributes="${attributes}|private|template|typedef|virtual|friend|extern" attributes="${attributes}|mutable|namespace|noexcept|override|private"
attributes="${attributes}|typename|override|final" attributes="${attributes}|protected|public|register|static|struct|template"
types="void|char|short|int|long|signed|unsigned|float|double|size_t|bool" attributes="${attributes}|thread_local|typedef|typename|union|virtual"
values="this|true|false|NULL|nullptr" attributes="${attributes}|volatile"
types="bool|byte|char|char16_t|char32_t|double|float|int|long|max_align_t"
types="${types}|nullptr_t|ptrdiff_t|short|signed|size_t|unsigned|void"
types="${types}|wchar_t"
values="NULL|false|nullptr|this|true"
# Add the language's grammar to the static completion list # Add the language's grammar to the static completion list
printf %s\\n "hook global WinSetOption filetype=cpp %{ printf %s\\n "hook global WinSetOption filetype=cpp %{
@ -219,15 +225,17 @@ add-highlighter shared/objc/code regex %{\b-?\d+[fdiu]?|'((\\.)?|[^'\\])'} 0:val
%sh{ %sh{
# Grammar # Grammar
keywords="while|for|if|else|do|switch|case|default|goto|break|continue|return" keywords="break|case|continue|default|do|else|for|goto|if|return|switch"
attributes="const|auto|inline|static|volatile|struct|enum|union|typedef" keywords="${keywords}|while"
attributes="${attributes}|extern|__block|nonatomic|assign|copy|strong" attributes="IBAction|IBOutlet|__block|assign|auto|const|copy|enum|extern"
attributes="${attributes}|retain|weak|readonly|IBAction|IBOutlet" attributes="${attributes}|inline|nonatomic|readonly|retain|static|strong"
types="void|char|short|int|long|signed|unsigned|float|bool|size_t" attributes="${attributes}|struct|typedef|union|volatile|weak"
types="${types}|instancetype|BOOL|NSInteger|NSUInteger|CGFloat|NSString" types="BOOL|CGFloat|NSInteger|NSString|NSUInteger|bool|char|float"
values="self|nil|id|super|TRUE|FALSE|YES|NO|NULL" types="${types}|instancetype|int|long|short|signed|size_t|unsigned|void"
decorators="property|synthesize|interface|implementation|protocol|end" values="FALSE|NO|NULL|TRUE|YES|id|nil|self|super"
decorators="${decorators}|selector|autoreleasepool|try|catch|class|synchronized" decorators="autoreleasepool|catch|class|end|implementation|interface"
decorators="${decorators}|property|protocol|selector|synchronized"
decorators="${decorators}|synthesize|try"
# Add the language's grammar to the static completion list # Add the language's grammar to the static completion list
printf %s\\n "hook global WinSetOption filetype=objc %{ printf %s\\n "hook global WinSetOption filetype=objc %{