OLD | NEW |
1 " Vim syntax file " Language: Dart | 1 " Vim syntax file " Language: Dart |
2 " Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 2 " Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
3 " for details. All rights reserved. Use of this source code is governed by a | 3 " for details. All rights reserved. Use of this source code is governed by a |
4 " BSD-style license that can be found in the LICENSE file. | 4 " BSD-style license that can be found in the LICENSE file. |
5 | 5 |
6 " Quit when a syntax file was already loaded | 6 " Quit when a syntax file was already loaded |
7 if !exists("main_syntax") | 7 if !exists("main_syntax") |
8 if version < 600 | 8 if version < 600 |
9 syntax clear | 9 syntax clear |
10 elseif exists("b:current_syntax") | 10 elseif exists("b:current_syntax") |
11 finish | 11 finish |
12 endif | 12 endif |
13 " we define it here so that included files can test for it | 13 " we define it here so that included files can test for it |
14 let main_syntax='dart' | 14 let main_syntax='dart' |
15 syn region dartFold start="{" end="}" transparent fold | 15 syn region dartFold start="{" end="}" transparent fold |
16 endif | 16 endif |
17 | 17 |
18 " keyword definitions | 18 " keyword definitions |
19 syn keyword dartConditional if else switch | 19 syn keyword dartConditional if else switch |
20 syn keyword dartRepeat do while for | 20 syn keyword dartRepeat do while for |
21 syn keyword dartBoolean true false | 21 syn keyword dartBoolean true false |
22 syn keyword dartConstant null | 22 syn keyword dartConstant null |
23 syn keyword dartTypedef this super class typedef | 23 syn keyword dartTypedef this super class typedef |
24 syn keyword dartOperator new is in factory const | 24 syn keyword dartOperator new is in factory const |
25 syn match dartOperator "+=\=\|-=\=\|*=\=\|/=\=\|%=\=\|\~/=\=\|<<=\=\|>>=
\=\|[<>]=\=\|===\=\|\!==\=\|&=\=\|\^=\=\||=\=\|||\|&&\|\[\]=\=\|=>\|!\|\~" | 25 syn match dartOperator "+=\=\|-=\=\|*=\=\|/=\=\|%=\=\|\~/=\=\|<<=\=\|>>=
\=\|[<>]=\=\|===\=\|\!==\=\|&=\=\|\^=\=\||=\=\|||\|&&\|\[\]=\=\|=>\|!\|\~" |
26 syn keyword dartType void var final bool int double num | 26 syn keyword dartType void var final bool int double num |
27 syn keyword dartCommonInterfaces String Object Math RegExp Date | 27 syn keyword dartCommonInterfaces String Object Math RegExp Date |
28 syn keyword dartInterfaces Collection Comparable Completer Duration Dynami
c Function Future Hashable HashMap HashSet Iterable Iterator LinkedHashMap List
Map Match Options Pattern Queue Set Stopwatch StringBuffer TimeZone | 28 syn keyword dartInterfaces Collection Comparable Completer Duration Dynami
c Function Future HashMap HashSet Iterable Iterator LinkedHashMap List Map Match
Options Pattern Queue Set Stopwatch StringBuffer TimeZone |
29 syn keyword dartErrors AssertionError TypeError FallThroughError | 29 syn keyword dartErrors AssertionError TypeError FallThroughError |
30 syn keyword dartStatement return | 30 syn keyword dartStatement return |
31 syn keyword dartStorageClass static abstract | 31 syn keyword dartStorageClass static abstract |
32 syn keyword dartExceptions throw try catch finally | 32 syn keyword dartExceptions throw try catch finally |
33 syn keyword dartExceptions BadNumberFormatException ClosureArgumentMismatchE
xception EmptyQueueException Exception ExpectException FutureAlreadyCompleteExce
ption FutureNotCompleteException IllegalAccessException ArgumentError IllegalJSR
egExpException IndexOutOfRangeException IntegerDivisionByZeroException NoMoreEle
mentsException NoSuchMethodError NotImplementedException NullPointerException Ob
jectNotClosureException OutOfMemoryException StackOverflowException UnsupportedO
perationException WrongArgumentCountException | 33 syn keyword dartExceptions BadNumberFormatException ClosureArgumentMismatchE
xception EmptyQueueException Exception ExpectException FutureAlreadyCompleteExce
ption FutureNotCompleteException IllegalAccessException ArgumentError IllegalJSR
egExpException IndexOutOfRangeException IntegerDivisionByZeroException NoMoreEle
mentsException NoSuchMethodError NotImplementedException NullPointerException Ob
jectNotClosureException OutOfMemoryException StackOverflowException UnsupportedO
perationException WrongArgumentCountException |
34 syn keyword dartAssert assert | 34 syn keyword dartAssert assert |
35 syn keyword dartClassDecl extends implements interface | 35 syn keyword dartClassDecl extends implements interface |
36 " TODO(antonm): check if labels on break and continue are supported. | 36 " TODO(antonm): check if labels on break and continue are supported. |
37 syn keyword dartBranch break continue nextgroup=dartUserLabelRef skipwhi
te | 37 syn keyword dartBranch break continue nextgroup=dartUserLabelRef skipwhi
te |
38 syn keyword dartKeyword get set operator call equals negate external | 38 syn keyword dartKeyword get set operator call equals negate external |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
104 unlet main_syntax | 104 unlet main_syntax |
105 endif | 105 endif |
106 | 106 |
107 let b:spell_options="contained" | 107 let b:spell_options="contained" |
108 | 108 |
109 " Enable automatic indentation (2 spaces) | 109 " Enable automatic indentation (2 spaces) |
110 set expandtab | 110 set expandtab |
111 set shiftwidth=2 | 111 set shiftwidth=2 |
112 set softtabstop=2 | 112 set softtabstop=2 |
113 set cindent | 113 set cindent |
OLD | NEW |