-- 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" }, }