Mercurial > vim
view runtime/syntax/automake.vim @ 33767:4913b4f5a133 v9.0.2104
patch 9.0.2104: wast filetype should be replaced by wat filetype
Commit: https://github.com/vim/vim/commit/bc8f79d36a456054ed29f46585830af6d71f57c8
Author: rhysd <lin90162@yahoo.co.jp>
Date: Tue Nov 14 16:46:07 2023 +0100
patch 9.0.2104: wast filetype should be replaced by wat filetype
Problem: wast filetype should be replaced by wat filetype
Solution: start using the official wat filetype name
runtime: rename `wast` filetype to `wat` (Wasm text format)
The problem is the name of the current filetype wast. When the plugin
was initially created, the file extension for Wasm text format was not
fixed and .wast was more popular.
However, recently .wat became the official file extension for
WebAssembly text (WAT) format and .wast is now a file extension for the
unofficial WAST format, which is a superset of .wat for the convenience
to describe the Wasm specification conformance tests.
https://webassembly.js.org/docs/contrib-wat-vs-wast.html
However for now, let's keep using the `wat` filetype even for the .wast
extension, so that we at least do not lose the filetype settings and
syntax highlighting. This can be adjusted later, if it turns out to have
a separate need for.
closes: #13533
Signed-off-by: rhysd <lin90162@yahoo.co.jp>
Signed-off-by: Christian Brabandt <cb@256bit.org>
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Tue, 14 Nov 2023 17:15:03 +0100 |
parents | cc751d944b7e |
children |
line wrap: on
line source
" Vim syntax file " Language: automake Makefile.am " Maintainer: Debian Vim Maintainers " Former Maintainer: John Williams <jrw@pobox.com> " Last Change: 2023 Jan 16 " URL: https://salsa.debian.org/vim-team/vim-debian/blob/main/syntax/automake.vim " " XXX This file is in need of a new maintainer, Debian VIM Maintainers maintain " it only because patches have been submitted for it by Debian users and the " former maintainer was MIA (Missing In Action), taking over its " maintenance was thus the only way to include those patches. " If you care about this file, and have time to maintain it please do so! " " This script adds support for automake's Makefile.am format. It highlights " Makefile variables significant to automake as well as highlighting " autoconf-style @variable@ substitutions . Subsitutions are marked as errors " when they are used in an inappropriate place, such as in defining " EXTRA_SOURCES. " Standard syntax initialization if exists('b:current_syntax') finish endif " Read the Makefile syntax to start with runtime! syntax/make.vim syn match automakePrimary "^\w\+\(_PROGRAMS\|_LIBRARIES\|_LISP\|_PYTHON\|_JAVA\|_SCRIPTS\|_DATA\|_HEADERS\|_MANS\|_TEXINFOS\|_LTLIBRARIES\)\s*\ze+\==" syn match automakePrimary "^TESTS\s*\ze+\=="me=e-1 syn match automakeSecondary "^\w\+\(_SOURCES\|_LIBADD\|_LDADD\|_LDFLAGS\|_DEPENDENCIES\|_AR\|_CCASFLAGS\|_CFLAGS\|_CPPFLAGS\|_CXXFLAGS\|_FCFLAGS\|_FFLAGS\|_GCJFLAGS\|_LFLAGS\|_LIBTOOLFLAGS\|OBJCFLAGS\|RFLAGS\|UPCFLAGS\|YFLAGS\)\s*\ze+\==" syn match automakeSecondary "^\(LDADD\|ARFLAGS\|OMIT_DEPENDENCIES\|AM_MAKEFLAGS\|\(AM_\)\=\(MAKEINFOFLAGS\|RUNTESTDEFAULTFLAGS\|ETAGSFLAGS\|CTAGSFLAGS\|JAVACFLAGS\)\)\s*\ze+\==" syn match automakeExtra "^EXTRA_\w\+\s*\ze+\==" syn match automakeOptions "^\(ACLOCAL_AMFLAGS\|AUTOMAKE_OPTIONS\|DISTCHECK_CONFIGURE_FLAGS\|ETAGS_ARGS\|TAGS_DEPENDENCIES\)\s*\ze+\==" syn match automakeClean "^\(MOSTLY\|DIST\|MAINTAINER\)\=CLEANFILES\s*\ze+\==" syn match automakeSubdirs "^\(DIST_\)\=SUBDIRS\s*\ze+\==" syn match automakeConditional "^\(if\s*!\=\w\+\|else\|endif\)\s*$" syn match automakeSubst "@\w\+@" syn match automakeSubst "^\s*@\w\+@" syn match automakeComment1 "#.*$" contains=automakeSubst,@Spell syn match automakeComment2 "##.*$" contains=@Spell syn match automakeMakeError "$[{(][^})]*[^a-zA-Z0-9_})][^})]*[})]" " GNU make function call syn match automakeMakeError "^AM_LDADD\s*\ze+\==" " Common mistake syn region automakeNoSubst start="^EXTRA_\w*\s*+\==" end="$" contains=ALLBUT,automakeNoSubst transparent syn region automakeNoSubst start="^DIST_SUBDIRS\s*+\==" end="$" contains=ALLBUT,automakeNoSubst transparent syn region automakeNoSubst start="^\w*_SOURCES\s*+\==" end="$" contains=ALLBUT,automakeNoSubst transparent syn match automakeBadSubst "@\(\w*@\=\)\=" contained syn region automakeMakeDString start=+"+ skip=+\\"+ end=+"+ contains=makeIdent,automakeSubstitution syn region automakeMakeSString start=+'+ skip=+\\'+ end=+'+ contains=makeIdent,automakeSubstitution syn region automakeMakeBString start=+`+ skip=+\\`+ end=+`+ contains=makeIdent,makeSString,makeDString,makeNextLine,automakeSubstitution " Define the default highlighting. " Only when an item doesn't have highlighting yet hi def link automakePrimary Statement hi def link automakeSecondary Type hi def link automakeExtra Special hi def link automakeOptions Special hi def link automakeClean Special hi def link automakeSubdirs Statement hi def link automakeConditional PreProc hi def link automakeSubst PreProc hi def link automakeComment1 makeComment hi def link automakeComment2 makeComment hi def link automakeMakeError makeError hi def link automakeBadSubst makeError hi def link automakeMakeDString makeDString hi def link automakeMakeSString makeSString hi def link automakeMakeBString makeBString let b:current_syntax = 'automake' " vi: ts=8 sw=4 sts=4