annotate runtime/syntax/dart.vim @ 21084:0768e80dc778

Added tag v8.2.1093 for changeset cc4914752841d409767d6c95c4486df49b748d46
author Bram Moolenaar <Bram@vim.org>
date Mon, 29 Jun 2020 23:15:05 +0200
parents 6d11fc4aa683
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
18456
6d11fc4aa683 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
1 " Vim syntax file
6d11fc4aa683 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
2 "
6d11fc4aa683 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
3 " Language: Dart
6d11fc4aa683 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
4 " Maintainer: Eugene 'pr3d4t0r' Ciurana <dart.syntax AT cime.net >
6d11fc4aa683 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
5 " Source: https://github.com/pr3d4t0r/dart-vim-syntax
6d11fc4aa683 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
6 " Last Update: 2019 Oct 19
6d11fc4aa683 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
7 "
6d11fc4aa683 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
8 " License: Vim is Charityware. dart.vim syntax is Charityware.
6d11fc4aa683 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
9 " (c) Copyright 2019 by Eugene Ciurana / pr3d4t0r. Licensed
6d11fc4aa683 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
10 " under the standard VIM LICENSE - Vim command :help uganda.txt
6d11fc4aa683 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
11 " for details.
6d11fc4aa683 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
12 "
6d11fc4aa683 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
13 " Questions, comments: <dart.syntax AT cime.net>
6d11fc4aa683 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
14 " https://ciurana.eu/pgp, https://keybase.io/pr3d4t0r
6d11fc4aa683 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
15 "
6d11fc4aa683 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
16 " vim: set fileencoding=utf-8:
6d11fc4aa683 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
17
6d11fc4aa683 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
18
6d11fc4aa683 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
19 " Quit when a (custom) syntax file was already loaded
6d11fc4aa683 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
20 if exists("b:current_syntax")
6d11fc4aa683 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
21 finish
6d11fc4aa683 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
22 endif
6d11fc4aa683 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
23
6d11fc4aa683 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
24 let s:cpo_save = &cpo
6d11fc4aa683 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
25 set cpo&vim
6d11fc4aa683 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
26
6d11fc4aa683 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
27
6d11fc4aa683 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
28 syn keyword dartCommentTodo contained TODO FIXME XXX TBD
6d11fc4aa683 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
29 syn match dartLineComment "//.*" contains=dartTodo,@Spell
6d11fc4aa683 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
30 syn match dartCommentSkip "^[ \t]*\*\($\|[ \t]\+\)"
6d11fc4aa683 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
31 syn region dartComment start="/\*" end="\*/" contains=@Spell,dartTodo
6d11fc4aa683 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
32 syn keyword dartReserved assert async await class const export extends external final hide import implements interface library mixin on show super sync yield
6d11fc4aa683 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
33 syn match dartNumber "-\=\<\d\+L\=\>\|0[xX][0-9a-fA-F]\+\>"
6d11fc4aa683 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
34
6d11fc4aa683 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
35
6d11fc4aa683 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
36 syn keyword dartBoolean false true
6d11fc4aa683 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
37 syn keyword dartBranch break continue
6d11fc4aa683 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
38 syn keyword dartConditional if else switch
6d11fc4aa683 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
39 syn keyword dartException catch finally rethrow throw try
6d11fc4aa683 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
40 syn keyword dartIdentifier abstract covariant deferred dynamic factory Function operator part static this typedef var
6d11fc4aa683 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
41 syn keyword dartLabel case default
6d11fc4aa683 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
42 syn keyword dartNull null
6d11fc4aa683 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
43 syn keyword dartOperator is new
6d11fc4aa683 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
44 syn keyword dartRepeat for do in while
6d11fc4aa683 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
45 syn keyword dartStatement return with
6d11fc4aa683 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
46 syn keyword dartType bool double enum int String StringBuffer void
6d11fc4aa683 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
47 syn keyword dartTodo contained TODO FIXME XXX
6d11fc4aa683 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
48
6d11fc4aa683 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
49
6d11fc4aa683 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
50 syn match dartEscape contained "\\\([4-9]\d\|[0-3]\d\d\|[\"\\'ntbrf]\|u\x\{4\}\)"
6d11fc4aa683 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
51 syn match dartSpecialError contained "\\."
6d11fc4aa683 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
52 syn match dartStrInterpol contained "\${[\x, _]*\}"
6d11fc4aa683 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
53
6d11fc4aa683 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
54 syn region dartDQString start=+"+ end=+"+ end=+$+ contains=dartEscape,dartStrInterpol,dartSpecialError,@Spell
6d11fc4aa683 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
55 syn region dartSQString start=+'+ end=+'+ end=+$+ contains=dartEscape,dartStrInterpol,dartSpecialError,@Spell
6d11fc4aa683 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
56
6d11fc4aa683 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
57 syn match dartBraces "[{}\[\]]"
6d11fc4aa683 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
58 syn match dartParens "[()]"
6d11fc4aa683 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
59
6d11fc4aa683 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
60
6d11fc4aa683 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
61 syn sync fromstart
6d11fc4aa683 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
62 syn sync maxlines=100
6d11fc4aa683 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
63
6d11fc4aa683 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
64
6d11fc4aa683 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
65 hi def link dartBoolean Boolean
6d11fc4aa683 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
66 hi def link dartBranch Conditional
6d11fc4aa683 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
67 hi def link dartComment Comment
6d11fc4aa683 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
68 hi def link dartConditional Conditional
6d11fc4aa683 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
69 hi def link dartDQString String
6d11fc4aa683 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
70 hi def link dartEscape SpecialChar
6d11fc4aa683 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
71 hi def link dartException Exception
6d11fc4aa683 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
72 hi def link dartIdentifier Identifier
6d11fc4aa683 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
73 hi def link dartLabel Label
6d11fc4aa683 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
74 hi def link dartLineComment Comment
6d11fc4aa683 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
75 hi def link dartNull Keyword
6d11fc4aa683 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
76 hi def link dartOperator Operator
6d11fc4aa683 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
77 hi def link dartRepeat Repeat
6d11fc4aa683 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
78 hi def link dartReserved Keyword
6d11fc4aa683 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
79 hi def link dartSQString String
6d11fc4aa683 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
80 hi def link dartSpecialError Error
6d11fc4aa683 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
81 hi def link dartStatement Statement
6d11fc4aa683 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
82 hi def link dartStrInterpol Special
6d11fc4aa683 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
83 hi def link dartTodo Todo
6d11fc4aa683 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
84 hi def link dartType Type
6d11fc4aa683 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
85
6d11fc4aa683 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
86
6d11fc4aa683 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
87 let b:current_syntax = "dart"
6d11fc4aa683 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
88 let &cpo = s:cpo_save
6d11fc4aa683 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
89 unlet s:cpo_save
6d11fc4aa683 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
90