Search Results for

    Show / Hide Table of Contents

    Class LuaExtensions

    The extension methods for

    Inheritance
    System.Object
    LuaExtensions
    Inherited Members
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.GetHashCode()
    System.Object.GetType()
    System.Object.MemberwiseClone()
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.ToString()
    Namespace: Loretta.CodeAnalysis.Lua.Experimental
    Assembly: Loretta.CodeAnalysis.Lua.Experimental.dll
    Syntax
    public static class LuaExtensions

    Methods

    | Improve this Doc View Source

    ConstantFold(SyntaxNode, ConstantFoldingOptions)

    Runs constant folding on the tree rooted by the provided node.

    Declaration
    public static SyntaxNode ConstantFold(this SyntaxNode node, ConstantFoldingOptions options)
    Parameters
    Type Name Description
    SyntaxNode node
    ConstantFoldingOptions options

    Options to use when constant folding.

    Returns
    Type Description
    SyntaxNode
    | Improve this Doc View Source

    Minify(SyntaxTree)

    Minifies the provided tree using the provided naming strategy.

    Declaration
    public static SyntaxTree Minify(this SyntaxTree tree)
    Parameters
    Type Name Description
    SyntaxTree tree
    Returns
    Type Description
    SyntaxTree

    The tree with the new minified root.

    | Improve this Doc View Source

    Minify(SyntaxTree, NamingStrategy)

    Minifies the provided tree using the provided naming strategy.

    Declaration
    public static SyntaxTree Minify(this SyntaxTree tree, NamingStrategy namingStrategy)
    Parameters
    Type Name Description
    SyntaxTree tree
    NamingStrategy namingStrategy
    Returns
    Type Description
    SyntaxTree

    The tree with the new minified root.

    | Improve this Doc View Source

    Minify(SyntaxTree, NamingStrategy, ISlotAllocator)

    Minifies the provided tree using the provided naming strategy.

    Declaration
    public static SyntaxTree Minify(this SyntaxTree tree, NamingStrategy namingStrategy, ISlotAllocator slotAllocator)
    Parameters
    Type Name Description
    SyntaxTree tree

    The tree to minify.

    NamingStrategy namingStrategy

    The naming strategy to use. See NamingStrategies for common ones.

    ISlotAllocator slotAllocator

    The slot allocator to use. There are two builtin ones:

    • SequentialSlotAllocator - fast but doesn't reuse variable names.
    • SortedSlotAllocator - reuses variable names as much as possible.
    Returns
    Type Description
    SyntaxTree

    The tree with the new minified root.

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

    Copyright (c) LorettaDevs

    Generated by DocFX

    ☀
    ☾