summaryrefslogtreecommitdiff
path: root/lite-xl/plugins/language_haxe.lua
blob: 2ed709fac42bc3fe754d35748cddf9604ee4c676 (plain)
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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
-- mod-version:2 -- lite-xl 2.0
local syntax = require "core.syntax"

syntax.add {
  name = "Haxe",
  files = { "%.hx$" },
  comment = "//",
  patterns = {
    { pattern = "//.-\n",               type = "comment"  },
    { pattern = { "/%*", "%*/" },       type = "comment"  },
    { pattern = { '/%g', '/', '\\' },   type = "string"   },
    { pattern = { '"', '"', '\\' },     type = "string"   },
    { pattern = { "'", "'", '\\' },     type = "string"   },
    { pattern = { "`", "`", '\\' },     type = "string"   },
    { pattern = "0x[%da-fA-F]+",        type = "number"   },
    { pattern = "-?%d+[%d%.eE]*",       type = "number"   },
    { pattern = "-?%.?%d+",             type = "number"   },
    { pattern = "[%+%-=/%*%^%%<>!~|&]", type = "operator" },
    { pattern = "[%a_][%w_]*%f[(]",     type = "function" },
    { pattern = "[%a_][%w_]*",          type = "symbol"   },
  },
  symbols = {
    ["break"]= "keyword",
    ["callback"]= "keyword",
    ["case"]= "keyword",
    ["catch"]= "keyword",
    ["class"]= "keyword",
    ["continue"]= "keyword",
    ["default"]= "keyword",
    ["do"]= "keyword",
    ["else"]= "keyword",
    ["enum"]= "keyword",
    ["extends"]= "keyword",
    ["for"]= "keyword",
    ["function"]= "keyword",
    ["if"]= "keyword",
    ["implements"]= "keyword",
    ["import"]= "keyword",
    ["in"]= "keyword",
    ["interface"]= "keyword",
    ["new"]= "keyword",
    ["package"]= "keyword",
    ["return"]= "keyword",
    ["switch"]= "keyword",
    ["throw"]= "keyword",
    ["try"]= "keyword",
    ["typedef"]= "keyword",
    ["using"]= "keyword",
    ["var"]= "keyword",
    ["while"]= "keyword",
    ["abstract"]= "keyword",
    ["is"]= "keyword",
    ["as"]= "keyword",
    ["final"]= "keyword",
    ["null"]= "keyword",
    ["true"]= "keyword",
    ["false"]= "keyword",
    ["get"]= "keyword",
    ["set"]= "keyword",
    ["never"]= "keyword",
    ["Void"]= "keyword",
    ["Int"]= "keyword",
    ["Float"]= "keyword",
    ["Dynamic"]= "keyword",
    ["Bool"]= "keyword",
    ["Iterator"]= "keyword",
    ["Hash"]= "keyword",
    ["IntHash"]= "keyword",
    ["Int64"]= "keyword",
    ["Bytes"]= "keyword",
    ["Null"]= "keyword",
    ["Any"]= "keyword",
    ["Array"]= "keyword",
    ["Class"]= "keyword",
    ["Date"]= "keyword",
    ["DateTools"]= "keyword",
    ["Enum"]= "keyword",
    ["EnumValue"]= "keyword",
    ["EReg"]= "keyword",
    ["IntIterator"]= "keyword",
    ["Lambda"]= "keyword",
    ["List"]= "keyword",
    ["Map"]= "keyword",
    ["Math"]= "keyword",
    ["Reflect"]= "keyword",
    ["Std"]= "keyword",
    ["StdTypes"]= "keyword",
    ["String"]= "keyword",
    ["StringBuf"]= "keyword",
    ["StringTools"]= "keyword",
    ["Sys"]= "keyword",
    ["Type"]= "keyword",
    ["UInt"]= "keyword",
    ["Xml"]= "keyword",
    ["dynamic"]= "keyword",
    ["extern"]= "keyword",
    ["inline"]= "keyword",
    ["override"]= "keyword",
    ["private"]= "keyword",
    ["public"]= "keyword",
    ["static"]= "keyword",
    ["untyped"]= "keyword",
    ["cast"]= "keyword",
    ["trace"]= "keyword",
    ["super"]= "keyword",
    ["this"]= "keyword",
    ["arguments"]= "keyword",
    ["from"]= "keyword",
    ["to"]= "keyword",
    ["macro"]= "keyword",
    ["arrayAccess"]= "keyword",
    ["optional"]= "keyword",
    ["$type"]= "keyword",
    ["#"]= "keyword",
    ["@"]= "keyword",
    ["$v"]= "keyword",
    ["$i"]= "keyword",
    ["$a"]= "keyword",
    ["$b"]= "keyword",
    ["$p"]= "keyword",
    ["$e"]= "keyword",
    ["$"]= "keyword"
  },
}