Skip to content

Commit

Permalink
Add partial application
Browse files Browse the repository at this point in the history
As defined in tc39/proposal-partial-application, proposed in
pangloss#1205
  • Loading branch information
vieira committed May 22, 2021
1 parent bfcfdff commit ac2c10f
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion syntax/javascript.vim
Original file line number Diff line number Diff line change
Expand Up @@ -576,6 +576,9 @@ syntax match jsOperator /??/
\ skipwhite skipempty
\ nextgroup=@jsExpression

syntax match jsFuncArgPartApp contained /\%([(,]\s*\)\@<=?\%(\s*[,)]\)\@=/
\ containedin=jsFuncArgs

syntax match jsGenerator contained /\*/
\ skipwhite skipempty
\ nextgroup=jsFuncName,jsFuncArgs,tsFunctionGroup
Expand Down Expand Up @@ -807,7 +810,7 @@ if exists("javascript_plugin_typescript")
runtime extras/typescript.vim
endif

syntax cluster jsExpression contains=jsBracket,jsParen,jsObject,jsTernaryIf,jsTaggedTemplate,jsTemplateString,jsString,jsRegexpString,jsNumber,jsFloat,jsOperator,jsOperatorKeyword,jsBooleanTrue,jsBooleanFalse,jsNull,jsFunction,jsArrowFunction,jsGlobalObjects,jsExceptions,jsFutureKeys,jsDomErrNo,jsDomNodeConsts,jsHtmlEvents,jsFuncCall,jsUndefined,jsNan,jsPrototype,jsBuiltins,jsNoise,jsClassDefinition,tsInterfaceDefinition,jsArrowFunction,jsArrowFuncArgs,jsParensError,jsComment,jsArguments,jsThis,jsSuper,jsDo,jsForAwait,jsAsyncKeyword,jsStatement,jsDot,tsAssertion
syntax cluster jsExpression contains=jsBracket,jsParen,jsObject,jsTernaryIf,jsTaggedTemplate,jsTemplateString,jsString,jsRegexpString,jsNumber,jsFloat,jsOperator,jsOperatorKeyword,jsBooleanTrue,jsBooleanFalse,jsNull,jsFunction,jsArrowFunction,jsGlobalObjects,jsExceptions,jsFutureKeys,jsDomErrNo,jsDomNodeConsts,jsHtmlEvents,jsFuncCall,jsUndefined,jsNan,jsPrototype,jsBuiltins,jsNoise,jsClassDefinition,tsInterfaceDefinition,jsArrowFunction,jsArrowFuncArgs,jsParensError,jsComment,jsArguments,jsThis,jsSuper,jsDo,jsForAwait,jsAsyncKeyword,jsStatement,jsDot,tsAssertion,jsFuncArgPartApp

syntax cluster jsAll contains=@jsExpression,jsStorageClass,jsConditional,jsRepeat,jsReturn,jsException,jsTry,jsNoise,jsBlockLabel,tsAssertion

Expand Down Expand Up @@ -867,6 +870,7 @@ if version >= 508 || !exists("did_javascript_syn_inits")
HiLink jsClassFuncName jsFuncName
HiLink jsObjectFuncName Function
HiLink jsArguments Special
HiLink jsFuncArgPartApp Special
HiLink jsError Error
HiLink jsParensError Error
HiLink jsOperatorKeyword jsOperator
Expand Down

0 comments on commit ac2c10f

Please sign in to comment.