]> git.lizzy.rs Git - micro.git/blob - runtime/syntax/dart.yaml
Add converted syntax files
[micro.git] / runtime / syntax / dart.yaml
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.bool: "\\b(true|false|null)\\b"
15     - type: "\\b(List|String)\\b"
16     - type: "\\b(int|num|double|bool)\\b"
17     - symbol.operator: "[-+/*=<>!~%?:&|]"
18     - constant: "/[^*]([^/]|(\\\\/))*[^\\\\]/[gim]*"
19     - constant: "\\\\[0-7][0-7]?[0-7]?|\\\\x[0-9a-fA-F]+|\\\\[bfnrt'\"\\?\\\\]"
20     - comment: "(^|[[:space:]])//.*"
21     - comment: "/\\*.+\\*/"
22     - todo: "TODO:?"
23     - constant.string: "\"(\\\\.|[^\"])*\"|'(\\\\.|[^'])*'"