aboutsummaryrefslogtreecommitdiffhomepage
path: root/scripts/gen_iface.lua
diff options
context:
space:
mode:
authorGravatar mitchell <70453897+667e-11@users.noreply.github.com>2013-09-16 22:02:02 -0400
committerGravatar mitchell <70453897+667e-11@users.noreply.github.com>2013-09-16 22:02:02 -0400
commita274210f459e32c11c227f55c2cf7a9cb50af2ad (patch)
tree83c62bae40fe5381913a51bcd007b67107061090 /scripts/gen_iface.lua
parent095980fbbc1f5f4956afdee2802b87ce45f245e7 (diff)
Removed the `SC` prefix from most constants in `_SCINTILLA.constants`.
Diffstat (limited to 'scripts/gen_iface.lua')
-rwxr-xr-xscripts/gen_iface.lua8
1 files changed, 1 insertions, 7 deletions
diff --git a/scripts/gen_iface.lua b/scripts/gen_iface.lua
index 6fa49cc0..b1c71298 100755
--- a/scripts/gen_iface.lua
+++ b/scripts/gen_iface.lua
@@ -48,7 +48,7 @@ for item in iface:match('Constants%[%] = (%b{})'):sub(2, -2):gmatch('%b{}') do
local skip = false
for i = 1, #ignores do if name:find(ignores[i]) then skip = true break end end
if not skip then
- name = name:gsub('SC_', '')
+ name = name:gsub('^SC_', ''):gsub('^SC([^N]%u+)', '%1')
if name == 'MASK_FOLDERS' then value = '-33554432' end
constants[#constants + 1] = string_format('%s=%s', name, value)
fielddoc[#fielddoc + 1] = string_format('-- * `%s.%s` %d', s, name, value)
@@ -89,12 +89,6 @@ for event, value in pairs(events) do
constants[#constants + 1] = string_format('%s=%d', event, value)
fielddoc[#fielddoc + 1] = string_format('-- * `%s.%s` %d', s, event, value)
end
--- Lexers added to constants.
-local lexers = { SCLEX_LPEG = 999 }
-for lexer, value in pairs(lexers) do
- constants[#constants + 1] = string_format('%s=%d', lexer, value)
- fielddoc[#fielddoc + 1] = string_format('-- * `%s.%s` %d', s, lexer, value)
-end
-- Write constants.
f:write [[