aboutsummaryrefslogtreecommitdiff
path: root/data/plugins/language_c.lua
diff options
context:
space:
mode:
authorNCarrezDev <n.carrez.dev@gmail.com>2022-07-06 10:15:44 +0200
committerNCarrezDev <n.carrez.dev@gmail.com>2022-07-06 10:15:44 +0200
commit030dcc1e62ff235271ee2dd84f07313a2bbf9574 (patch)
tree8c1f1bb9f64b1424235adf682b31830d0cdf9b0b /data/plugins/language_c.lua
parente646f2fb28b24bae5d13994b14b75252718a6ccd (diff)
downloadlite-xl-030dcc1e62ff235271ee2dd84f07313a2bbf9574.tar.gz
lite-xl-030dcc1e62ff235271ee2dd84f07313a2bbf9574.zip
[chore]: Update syntax
Harmonizing the syntax files Now inline comment are a single string instead of a table of strings. -(language_c): Removed whitespaces breaking indent -(language_html): Removed trailing whitespace
Diffstat (limited to 'data/plugins/language_c.lua')
-rw-r--r--data/plugins/language_c.lua6
1 files changed, 3 insertions, 3 deletions
diff --git a/data/plugins/language_c.lua b/data/plugins/language_c.lua
index f3154ed3..e644c90e 100644
--- a/data/plugins/language_c.lua
+++ b/data/plugins/language_c.lua
@@ -7,7 +7,7 @@ syntax.add {
comment = "//",
block_comment = { "/*", "*/" },
patterns = {
- { pattern = "//.-\n", type = "comment" },
+ { pattern = "//.*$", type = "comment" },
{ pattern = { "/%*", "%*/" }, type = "comment" },
{ pattern = { '"', '"', '\\' }, type = "string" },
{ pattern = { "'", "'", '\\' }, type = "string" },
@@ -61,11 +61,11 @@ syntax.add {
{ pattern = "_?%u[%u_][%u%d_]*%f[%s%+%*%-%.%)%]}%?%^%%=/<>~|&;:,!]",
type = "number"
},
- -- Magic constants
+ -- Magic constants
{ pattern = "__[%u%l]+__", type = "number" },
-- all other functions
{ pattern = "[%a_][%w_]*%f[(]", type = "function" },
- -- Macros
+ -- Macros
{ pattern = "^%s*#%s*define%s+()[%a_][%a%d_]*",
type = { "keyword", "symbol" }
},