File: rust.lang

package info (click to toggle)
highlight 4.10-1.1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 7,556 kB
  • sloc: cpp: 27,579; makefile: 411; sh: 341; ansic: 264; php: 236; python: 217; ruby: 132; perl: 61; tcl: 1
file content (65 lines) | stat: -rw-r--r-- 1,611 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65

Description="Rust"

Categories = {"source"}

Digits=[[ (?:0x|0o|0b)[0-9a-fA-F\_uif]+|\d+[\.]?[\d\_uif]+(?:[eE][\-\+][\d\_uif]+)?|\d+ ]]

Keywords={
  { Id=1,
    List={"as", "box", "break", "const", "continue", "crate", "else",
          "extern", "false", "fn", "for", "if", "impl", "in", "let", "loop",
          "match", "mod", "move", "mut", "pub", "ref", "return", "self",
          "Self", "static", "super", "trait", "true", "type",
          "unsafe", "use", "where", "while", "abstract", "alignof", "become",
          "do", "final", "macro", "offsetof", "override", "priv", "pure",
          "sizeof", "typeof", "unsized", "virtual", "yield", "auto", "catch"
        }
  },
  { Id=2,
    List= { "u8", "u16", "u32", "u64", "i8", "i16", "i32", "i64",
            "f32", "f64", "usize", "isize", "char", "str", "struct","enum"
          }
  },

  -- weak keywords
  { Id=3,
    List= { "default", "dyn", "union"
          }
  },
  { Id=4,
    Regex=[[(\w+\!?)\s*\(]]
  },
  { Id=5,
      Regex=[[b'(?:[\x00-\x08\x0B\x0C\x0E-\x26\x28-\x5B\x5D-\x7F]|\\(?:[0tnr\'\\]|x[0-9a-fA-F]{2}))']]
  }
}

Strings = {
  Delimiter=[["]],
  RawPrefix="r",
  Escape = [[ \\[\'\\\"aftnrv]|\\x[0-9a-fA-F]{2}|\\U\{[0-9a-fA-F]{8}\}|\\u\{[0-9a-fA-F]{4}\}|\\x?? ]],
  Interpolation=[[ \{\S*?\} ]]
}

Comments = {
  { Block=true,
    Nested=true,
    Delimiter = { [[\/\*]], [[\*\/]] }
  },
  {
    Block=false,
    Delimiter = { [[//]] }
  }
}

IgnoreCase=false

PreProcessor = {
  Prefix=[[#]],
  Continuation="\\",
}

Operators=[[\(|\)|\[|\]|\{|\}|\,|\;|\.|\:|\&|<|>|\!|=|\/|\*|\%|\+|\-|\~|\||\^']]

EnableIndentation=true