Skip to content

A library as well as a console tool that re-targets code from one lua version to another

License

Notifications You must be signed in to change notification settings

LorettaDevs/Loretta.Retargeting

Repository files navigation

Loretta.Retargeting

A library as well as a console tool that re-targets code from one lua version to another

Progress

  • FiveM Hash Strings (LuaSyntaxOptions.AcceptHashStrings)
  • LuaJIT Identifier Special Characters (LuaSyntaxOptions.UseLuaJitIdentifierRules)
    • Warn on LuaJIT-only characters in identifiers
    • Rewrite identifiers to not use LuaJIT-only characters
  • Bitwise Operators (LuaSyntaxOptions.AcceptBitwiseOperators)
    • Call the function from the bit library if it is available
    • Implement the bitwise operators using math operators in runtimes that don't have the bit library
  • String Escapes
    • \z Escape (LuaSyntaxOptions.AcceptWhitespaceEscape)
    • \u Escape (LuaSyntaxOptions.AcceptUnicodeEscape)
    • \x Escape (LuaSyntaxOptions.AcceptHexEscapesInStrings)
  • continue (LuaSyntaxOptions.ContinueType)
  • Luau (Roblox Lua) if Expressions (LuaSyntaxOptions.AcceptIfExpressions)
  • Integers
    • Binary (LuaSyntaxOptions.BinaryIntegerFormat)
    • Octal (LuaSyntaxOptions.OctalIntegerFormat)
    • Decimal (LuaSyntaxOptions.DecimalIntegerFormat)
    • Hexadecimal (LuaSyntaxOptions.HexIntegerFormat)
  • Local Variable Attributes (LuaSyntaxOptions.AcceptLocalVariableAttributes)
  • Underscore in Number Literals (LuaSyntaxOptions.AcceptUnderscoreInNumberLiterals)
  • Luau Typed Lua (LuaSyntaxOptions.AcceptTypedLua)
  • Invalid Escapes (LuaSyntaxOptions.AcceptInvalidEscapes)
  • Shebang Handling (LuaSyntaxOptions.AcceptShebang)
  • Compound Assignments (LuaSyntaxOptions.AcceptCompoundAssignment)
  • Hexadecimal Float Literals (LuaSyntaxOptions.AcceptHexFloatLiterals)
  • Number Bases
    • Binary (LuaSyntaxOptions.AcceptBinaryNumbers)
    • Octal (LuaSyntaxOptions.AcceptOctalNumbers)
  • C Comment Syntax (LuaSyntaxOptions.AcceptCCommentSyntax)
  • Floor Division (LuaSyntaxOptions.AcceptFloorDivision)
  • LuaJIT Number Suffixes (LuaSyntaxOptions.AcceptLuaJITNumberSuffixes)
    • LL suffix
    • ULL suffix
    • i suffix
  • C boolean operators (LuaSyntaxOptions.AcceptCBooleanOperators)
  • goto (LuaSyntaxOptions.AcceptGoto)
  • Empty Statements (LuaSyntaxOptions.AcceptEmptyStatements)

About

A library as well as a console tool that re-targets code from one lua version to another

Resources

License

Stars

Watchers

Forks

Languages