-- mod-version:1 -- lite-xl 2.00 --[[ language_php.lua provides php syntax support allowing mixed html, css and js version: 20210513_144200 Depends on plugin language_phps.lua version >= 20210512_181200 --]] local syntax = require "core.syntax" syntax.add { files = { "%.php$", "%.phtml" }, patterns = { { pattern = { "<%?php%s+", "%?>" }, syntax = ".phps", type = "keyword2" }, { pattern = { "<%?=?", "%?>" }, syntax = ".phps", type = "keyword2" }, { pattern = { "<%s*[sS][cC][rR][iI][pP][tT]%s+[tT][yY][pP][eE]%s*=%s*" .. "['\"]%a+/[jJ][aA][vV][aA][sS][cC][rR][iI][pP][tT]['\"]%s*>", "<%s*/[sS][cC][rR][iI][pP][tT]>" }, syntax = ".js", type = "function" }, { pattern = { "<%s*[sS][cC][rR][iI][pP][tT]%s*>", "<%s*/%s*[sS][cC][rR][iI][pP][tT]>" }, syntax = ".js", type = "function" }, { pattern = { "<%s*[sS][tT][yY][lL][eE][^>]*>", "<%s*/%s*[sS][tT][yY][lL][eE]%s*>" }, syntax = ".css", type = "function" }, { pattern = { "" }, type = "comment" }, { pattern = { '%f[^>][^<]', '%f[<]' }, type = "normal" }, { pattern = { '"', '"', '\\' }, type = "string" }, { pattern = { "'", "'", '\\' }, type = "string" }, { pattern = "0x[%da-fA-F]+", type = "number" }, { pattern = "-?%d+[%d%.]*f?", type = "number" }, { pattern = "-?%.?%d+f?", type = "number" }, { pattern = "%f[^<]![%a_][%w_]*", type = "keyword2" }, { pattern = "%f[^<][%a_][%w_]*", type = "function" }, { pattern = "%f[^<]/[%a_][%w_]*", type = "function" }, { pattern = "[%a_][%w_]*", type = "keyword" }, { pattern = "[/<>=]", type = "operator" }, }, symbols = {}, }