Function patch_lua

Source
pub fn patch_lua<'h>(lua: impl Into<Cow<'h, str>>) -> Cow<'h, str>
Expand description

Given a string with the Pico-8 dialect of Lua, it will convert that code to plain Lua.

This function will not handle “#include path.p8” statements. It is recommended to use patch_includes before this function since if those inclusions may use the Pico-8 dialect.

NOTE: This is not a full language parser, but a series of regular expressions, so it is not guaranteed to work with every valid Pico-8 expression. But if it does not work, please file an issue with the failing expression.