Search Results for

    Loretta

    A C# (G)Lua lexer, parser, code analysis, transformation and code generation toolkit. For getting started, see the tutorial.

    Discord Loretta.CodeAnalysis.Lua Loretta.CodeAnalysis.Lua GitHub Workflow Status

    This is (another) rewrite from scratch based on Roslyn and The Complete Syntax of Lua with a few extensions:

    1. Operators introduced in Garry's Mod Lua (glua):
      • && for and;
      • || for or;
      • != for ~=;
      • ! for not;
    2. Comment types introduced in Garry's Mod Lua (glua):
      • C style single line comment: // ...;
      • C style multi line comment: /* */;
    3. Characters accepted as part of identifiers by LuaJIT (emojis, non-rendering characters, or basically any byte above 127/0x7F);
    4. Luau (Roblox Lua) syntax (partial):
      • Compound assignment: +=, -=, *=, /=, ^=, %=, ..=;
      • If expressions: if a then b else c and if a then b elseif c then d else e;
      • Typed lua syntax.
    5. FiveM's hash string syntax (only parsing, manual node creation currently not possible);
    6. Continue support. The following options are available:
      • No continue at all;
      • Roblox's continue which is a contextual keyword;
      • Garry's Mod's continue which is a full fledged keyword.

    TL;DR: This supports Lua 5.1, Lua 5.2, Lua 5.3, Lua 5.4, LuaJIT 2.0, LuaJIT 2.1, FiveM, GLua and (partially) Luau (Roblox Lua).

    • Improve this Doc
    ☀
    ☾
    In This Article
    Back to top

    Copyright (c) LorettaDevs

    Generated by DocFX

    ☀
    ☾