Search Results for

    Show / Hide Table of Contents

    Class SyntaxExtensions

    Extension methods for the Lua syntax.

    Inheritance
    System.Object
    SyntaxExtensions
    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
    Assembly: Loretta.CodeAnalysis.Lua.dll
    Syntax
    public static class SyntaxExtensions

    Methods

    | Improve this Doc View Source

    NormalizeWhitespace(SyntaxToken, String, Boolean)

    Creates a new syntax token with all whitespace and end of line trivia replaced with regularly formatted trivia.

    Declaration
    public static SyntaxToken NormalizeWhitespace(this SyntaxToken token, string indentation, bool elasticTrivia)
    Parameters
    Type Name Description
    SyntaxToken token

    The token to normalize.

    System.String indentation

    A sequence of whitespace characters that defines a single level of indentation.

    System.Boolean elasticTrivia

    If true the replaced trivia is elastic trivia.

    Returns
    Type Description
    SyntaxToken
    | Improve this Doc View Source

    NormalizeWhitespace(SyntaxToken, String, String, Boolean)

    Creates a new syntax token with all whitespace and end of line trivia replaced with regularly formatted trivia.

    Declaration
    public static SyntaxToken NormalizeWhitespace(this SyntaxToken token, string indentation = "    ", string eol = "\r\n", bool elasticTrivia = false)
    Parameters
    Type Name Description
    SyntaxToken token

    The token to normalize.

    System.String indentation

    An optional sequence of whitespace characters that defines a single level of indentation.

    System.String eol

    An optional sequence of whitespace characters used for end of line.

    System.Boolean elasticTrivia

    If true the replaced trivia is elastic trivia.

    Returns
    Type Description
    SyntaxToken
    | Improve this Doc View Source

    NormalizeWhitespace(SyntaxTriviaList, String, Boolean)

    Creates a new syntax trivia list with all whitespace and end of line trivia replaced with regularly formatted trivia.

    Declaration
    public static SyntaxTriviaList NormalizeWhitespace(this SyntaxTriviaList list, string indentation, bool elasticTrivia)
    Parameters
    Type Name Description
    SyntaxTriviaList list

    The trivia list to normalize.

    System.String indentation

    A sequence of whitespace characters that defines a single level of indentation.

    System.Boolean elasticTrivia

    If true the replaced trivia is elastic trivia.

    Returns
    Type Description
    SyntaxTriviaList
    | Improve this Doc View Source

    NormalizeWhitespace(SyntaxTriviaList, String, String, Boolean)

    Creates a new syntax trivia list with all whitespace and end of line trivia replaced with regularly formatted trivia.

    Declaration
    public static SyntaxTriviaList NormalizeWhitespace(this SyntaxTriviaList list, string indentation = "    ", string eol = "\r\n", bool elasticTrivia = false)
    Parameters
    Type Name Description
    SyntaxTriviaList list

    The trivia list to normalize.

    System.String indentation

    An optional sequence of whitespace characters that defines a single level of indentation.

    System.String eol

    An optional sequence of whitespace characters used for end of line.

    System.Boolean elasticTrivia

    If true the replaced trivia is elastic trivia.

    Returns
    Type Description
    SyntaxTriviaList
    | Improve this Doc View Source

    ToSyntaxTriviaList(IEnumerable<SyntaxTrivia>)

    Creates a SyntaxTriviaList from an of SyntaxTrivia.

    Declaration
    public static SyntaxTriviaList ToSyntaxTriviaList(this IEnumerable<SyntaxTrivia> sequence)
    Parameters
    Type Name Description
    IEnumerable<SyntaxTrivia> sequence
    Returns
    Type Description
    SyntaxTriviaList
    • Improve this Doc
    • View Source
    ☀
    ☾
    In This Article
    Back to top

    Copyright (c) LorettaDevs

    Generated by DocFX

    ☀
    ☾