| 1 |
filetype: dart |
| 2 |
|
| 3 |
detect: |
| 4 |
filename: "\\.dart$" |
| 5 |
|
| 6 |
rules: |
| 7 |
- constant.number: "\\b[-+]?([1-9][0-9]*|0[0-7]*|0x[0-9a-fA-F]+)([uU][lL]?|[lL][uU]?)?\\b" |
| 8 |
- constant.number: "\\b[-+]?([0-9]+\\.[0-9]*|[0-9]*\\.[0-9]+)([EePp][+-]?[0-9]+)?[fFlL]?" |
| 9 |
- constant.number: "\\b[-+]?([0-9]+[EePp][+-]?[0-9]+)[fFlL]?" |
| 10 |
- identifier: "[A-Za-z_][A-Za-z0-9_]*[[:space:]]*[(]" |
| 11 |
- statement: "\\b(break|case|catch|continue|default|else|finally)\\b" |
| 12 |
- statement: "\\b(for|function|get|if|in|as|is|new|return|set|switch|final|await|async|sync)\\b" |
| 13 |
- statement: "\\b(switch|this|throw|try|var|void|while|with|import|library|part|const|export)\\b" |
| 14 |
- constant: "\\b(true|false|null)\\b" |
| 15 |
- type: "\\b(List|String)\\b" |
| 16 |
- type: "\\b(int|num|double|bool)\\b" |
| 17 |
- statement: "[-+/*=<>!~%?:&|]" |
| 18 |
- constant: "/[^*]([^/]|(\\\\/))*[^\\\\]/[gim]*" |
| 19 |
- constant: "\\\\[0-7][0-7]?[0-7]?|\\\\x[0-9a-fA-F]+|\\\\[bfnrt'\"\\?\\\\]" |
| 20 |
|
| 21 |
- comment: |
| 22 |
start: "//" |
| 23 |
end: "$" |
| 24 |
rules: |
| 25 |
- todo: "TODO:?" |
| 26 |
|
| 27 |
- comment: |
| 28 |
start: "/\\*" |
| 29 |
end: "\\*/" |
| 30 |
rules: |
| 31 |
- todo: "TODO:?" |
| 32 |
|
| 33 |
- constant.string: |
| 34 |
start: "\"" |
| 35 |
end: "\"" |
| 36 |
skip: "\\\\." |
| 37 |
rules: |
| 38 |
- constant.specialChar: "\\\\." |
| 39 |
|
| 40 |
- constant.string: |
| 41 |
start: "'" |
| 42 |
end: "'" |
| 43 |
skip: "\\\\." |
| 44 |
rules: |
| 45 |
- constant.specialChar: "\\\\." |
| 46 |
|