Updated runtime files.

This commit is contained in:
Bram Moolenaar
2013-04-12 15:09:51 +02:00
parent 38ec50bea8
commit 0187ca0bdf
6 changed files with 345 additions and 251 deletions

View File

@ -1,13 +1,13 @@
" ninja build file syntax.
" Language: ninja build file as described at
" http://martine.github.com/ninja/manual.html
" Version: 1.2
" Last Change: 2012/06/01
" Version: 1.3
" Last Change: 2013 Apr 12
" Maintainer: Nicolas Weber <nicolasweber@gmx.de>
" ninja lexer and parser are at
" https://github.com/martine/ninja/blob/master/src/lexer.in.cc
" https://github.com/martine/ninja/blob/master/src/parsers.cc
" https://github.com/martine/ninja/blob/master/src/manifest_parser.cc
if exists("b:current_syntax")
finish
@ -19,9 +19,10 @@ syn match ninjaComment /#.*/ contains=@Spell
" Toplevel statements are the ones listed here and
" toplevel variable assignments (ident '=' value).
" lexer.in.cc, ReadToken() and parsers.cc, Parse()
" lexer.in.cc, ReadToken() and manifest_parser.cc, Parse()
syn match ninjaKeyword "^build\>"
syn match ninjaKeyword "^rule\>"
syn match ninjaKeyword "^pool\>"
syn match ninjaKeyword "^default\>"
syn match ninjaKeyword "^include\>"
syn match ninjaKeyword "^subninja\>"
@ -30,9 +31,12 @@ syn match ninjaKeyword "^subninja\>"
" on the first line without indent. 'rule' allows only a
" limited set of magic variables, 'build' allows general
" let assignments.
" parsers.cc, ParseRule()
" manifest_parser.cc, ParseRule()
syn region ninjaRule start="^rule" end="^\ze\S" contains=ALL transparent
syn keyword ninjaRuleCommand contained command depfile description generator restat
syn keyword ninjaRuleCommand contained command deps depfile description generator pool restat rspfile rspfile_content
syn region ninjaPool start="^pool" end="^\ze\S" contains=ALL transparent
syn keyword ninjaPoolCommand contained depth
" Strings are parsed as follows:
" lexer.in.cc, ReadEvalString()
@ -58,6 +62,7 @@ syn match ninjaOperator "\(=\|:\||\|||\)\ze\s"
hi def link ninjaComment Comment
hi def link ninjaKeyword Keyword
hi def link ninjaRuleCommand Statement
hi def link ninjaPoolCommand Statement
hi def link ninjaWrapLineOperator ninjaOperator
hi def link ninjaOperator Operator
hi def link ninjaSimpleVar ninjaVar