mirror of
https://github.com/minetest-mods/i3.git
synced 2025-07-04 09:30:23 +02:00
Tweak preprocessor to add -- decrement
This commit is contained in:
@ -51,6 +51,10 @@ local function compile(data)
|
||||
end
|
||||
end)
|
||||
|
||||
data = data:gsub("([%w_]+)-%-\n", function(a)
|
||||
return fmt("%s = %s - 1", a, a)
|
||||
end)
|
||||
|
||||
for op, func in pairs(operators) do
|
||||
data = data:gsub("(" .. var .. "+)%s?" .. op .. "%s?(" .. var .. "*)", func)
|
||||
end
|
||||
|
Reference in New Issue
Block a user