Mercurial > vim
view runtime/syntax/typescript.vim @ 30888:54ba95d2d2eb v9.0.0778
patch 9.0.0778: indexing of unknown const type fails during compilation
Commit: https://github.com/vim/vim/commit/4913d420e8e8619cff837372bce87683d6fcaa03
Author: Bram Moolenaar <Bram@vim.org>
Date: Mon Oct 17 13:13:32 2022 +0100
patch 9.0.0778: indexing of unknown const type fails during compilation
Problem: Indexing of unknown const type fails during compilation.
Solution: Check for "any" properly. (closes https://github.com/vim/vim/issues/11389)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Mon, 17 Oct 2022 14:15:09 +0200 |
parents | 2acb87ee55fc |
children | 71cbad0921c9 |
line wrap: on
line source
" Vim syntax file " Language: TypeScript " Maintainer: Bram Moolenaar, Herrington Darkholme " Last Change: 2019 Nov 30 " Based On: Herrington Darkholme's yats.vim " Changes: Go to https:github.com/HerringtonDarkholme/yats.vim for recent changes. " Origin: https://github.com/othree/yajs " Credits: Kao Wei-Ko(othree), Jose Elera Campana, Zhao Yi, Claudio Fleiner, Scott Shattuck " (This file is based on their hard work), gumnos (From the #vim " IRC Channel in Freenode) " This is the same syntax that is in yats.vim, but: " - flattened into one file " - HiLink commands changed to "hi def link" " - Setting 'cpo' to the Vim value if !exists("main_syntax") if exists("b:current_syntax") finish endif let main_syntax = 'typescript' endif let s:cpo_save = &cpo set cpo&vim " this region is NOT used in TypeScriptReact " nextgroup doesn't contain objectLiteral, let outer region contains it syntax region typescriptTypeCast matchgroup=typescriptTypeBrackets \ start=/< \@!/ end=/>/ \ contains=@typescriptType \ nextgroup=@typescriptExpression \ contained skipwhite oneline """"""""""""""""""""""""""""""""""""""""""""""""""" " Source the part common with typescriptreact.vim source <sfile>:h/shared/typescriptcommon.vim let b:current_syntax = "typescript" if main_syntax == 'typescript' unlet main_syntax endif let &cpo = s:cpo_save unlet s:cpo_save