mirror of
https://github.com/emptyynes/LIVM.git
synced 2025-01-04 23:52:25 +03:00
9 lines
No EOL
373 B
Lua
9 lines
No EOL
373 B
Lua
return {
|
|
source = function(source)
|
|
source = source:gsub("%(([^)]+)%)", " %1")
|
|
source = source:gsub("([|%^#][%w.]+%s+)([a-z]+)", "%1;%2"):gsub(":", ":;")
|
|
source = source:gsub("object", ";object"):gsub("section", ";section"):gsub("%[", ";["):gsub("%]", "];")
|
|
source = source:gsub("(\n%s+);", ";%1"):gsub(";(%s+);", ";%1"):gsub("^;", "")
|
|
return source .. ";"
|
|
end
|
|
} |