Class LuaExtensions
The extension methods for
Inheritance
System.Object
LuaExtensions
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: Loretta.CodeAnalysis.Lua.Experimental
Assembly: cs.temp.dll.dll
Syntax
public static class LuaExtensions
Methods
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 |
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. |
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. |
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:
|
Returns
| Type | Description |
|---|---|
| SyntaxTree | The tree with the new minified root. |