Search Results for

    Show / Hide Table of Contents

    Class LuaSyntaxNode

    Represents a non-terminal node in the syntax tree.

    Inheritance
    System.Object
    SyntaxNode
    LuaSyntaxNode
    CompilationUnitSyntax
    ElseClauseSyntax
    ElseIfClauseSyntax
    ElseIfExpressionClauseSyntax
    EqualsTypeSyntax
    EqualsValuesClauseSyntax
    ExpressionSyntax
    FunctionArgumentSyntax
    FunctionNameSyntax
    FunctionTypeParameterSyntax
    InterpolatedStringContentSyntax
    LocalDeclarationNameSyntax
    ParameterListSyntax
    ParameterSyntax
    StatementListSyntax
    StatementSyntax
    StructuredTriviaSyntax
    TableFieldSyntax
    TableTypeElementSyntax
    TypeArgumentListSyntax
    TypeBindingSyntax
    TypedIdentifierNameSyntax
    TypeParameterListSyntax
    TypeParameterSyntax
    TypeSyntax
    VariableAttributeSyntax
    Implements
    IFormattable
    Inherited Members
    SyntaxNode.RawKind
    SyntaxNode.SyntaxTree
    SyntaxNode.FullSpan
    SyntaxNode.Span
    SyntaxNode.SpanStart
    SyntaxNode.ToString()
    SyntaxNode.ToFullString()
    SyntaxNode.WriteTo(TextWriter)
    SyntaxNode.GetText(Encoding, SourceHashAlgorithm)
    SyntaxNode.IsEquivalentTo(SyntaxNode)
    SyntaxNode.IsIncrementallyIdenticalTo(SyntaxNode)
    SyntaxNode.IsMissing
    SyntaxNode.IsPartOfStructuredTrivia()
    SyntaxNode.IsStructuredTrivia
    SyntaxNode.HasStructuredTrivia
    SyntaxNode.ContainsSkippedText
    SyntaxNode.ContainsDirectives
    SyntaxNode.ContainsDiagnostics
    SyntaxNode.Contains(SyntaxNode)
    SyntaxNode.HasLeadingTrivia
    SyntaxNode.HasTrailingTrivia
    SyntaxNode.GetReference()
    SyntaxNode.Parent
    SyntaxNode.ParentTrivia
    SyntaxNode.ChildNodesAndTokens()
    SyntaxNode.ChildThatContainsPosition(Int32)
    SyntaxNode.ChildNodes()
    SyntaxNode.Ancestors(Boolean)
    SyntaxNode.AncestorsAndSelf(Boolean)
    SyntaxNode.FirstAncestorOrSelf<TNode>(Nullable<Func<TNode, Boolean>>, Boolean)
    SyntaxNode.FirstAncestorOrSelf<TNode, TArg>(Func<TNode, TArg, Boolean>, TArg, Boolean)
    SyntaxNode.DescendantNodes(Nullable<Func<SyntaxNode, Boolean>>, Boolean)
    SyntaxNode.DescendantNodes(TextSpan, Nullable<Func<SyntaxNode, Boolean>>, Boolean)
    SyntaxNode.DescendantNodesAndSelf(Nullable<Func<SyntaxNode, Boolean>>, Boolean)
    SyntaxNode.DescendantNodesAndSelf(TextSpan, Nullable<Func<SyntaxNode, Boolean>>, Boolean)
    SyntaxNode.DescendantNodesAndTokens(Nullable<Func<SyntaxNode, Boolean>>, Boolean)
    SyntaxNode.DescendantNodesAndTokens(TextSpan, Nullable<Func<SyntaxNode, Boolean>>, Boolean)
    SyntaxNode.DescendantNodesAndTokensAndSelf(Nullable<Func<SyntaxNode, Boolean>>, Boolean)
    SyntaxNode.DescendantNodesAndTokensAndSelf(TextSpan, Nullable<Func<SyntaxNode, Boolean>>, Boolean)
    SyntaxNode.FindNode(TextSpan, Boolean, Boolean)
    SyntaxNode.ChildTokens()
    SyntaxNode.DescendantTokens(Nullable<Func<SyntaxNode, Boolean>>, Boolean)
    SyntaxNode.DescendantTokens(TextSpan, Nullable<Func<SyntaxNode, Boolean>>, Boolean)
    SyntaxNode.FindTrivia(Int32, Nullable<Func<SyntaxTrivia, Boolean>>)
    SyntaxNode.DescendantTrivia(Nullable<Func<SyntaxNode, Boolean>>, Boolean)
    SyntaxNode.DescendantTrivia(TextSpan, Nullable<Func<SyntaxNode, Boolean>>, Boolean)
    SyntaxNode.ContainsAnnotations
    SyntaxNode.HasAnnotations(String)
    SyntaxNode.HasAnnotations(IEnumerable<String>)
    SyntaxNode.HasAnnotation(SyntaxAnnotation)
    SyntaxNode.GetAnnotations(String)
    SyntaxNode.GetAnnotations(IEnumerable<String>)
    SyntaxNode.GetAnnotatedNodesAndTokens(String)
    SyntaxNode.GetAnnotatedNodesAndTokens(String[])
    SyntaxNode.GetAnnotatedNodesAndTokens(SyntaxAnnotation)
    SyntaxNode.GetAnnotatedNodes(SyntaxAnnotation)
    SyntaxNode.GetAnnotatedNodes(String)
    SyntaxNode.GetAnnotatedTokens(SyntaxAnnotation)
    SyntaxNode.GetAnnotatedTokens(String)
    SyntaxNode.GetAnnotatedTrivia(String)
    SyntaxNode.GetAnnotatedTrivia(String[])
    SyntaxNode.GetAnnotatedTrivia(SyntaxAnnotation)
    SyntaxNode.CopyAnnotationsTo<T>(T)
    SyntaxNode.IsEquivalentTo(SyntaxNode, Boolean)
    SyntaxNode.SerializeTo(Stream, CancellationToken)
    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)
    Namespace: Loretta.CodeAnalysis.Lua
    Assembly: Loretta.CodeAnalysis.Lua.dll
    Syntax
    public abstract class LuaSyntaxNode : SyntaxNode

    Properties

    | Improve this Doc View Source

    Language

    The language name that this node is syntax of.

    Declaration
    public override string Language { get; }
    Property Value
    Type Description
    System.String
    Overrides
    SyntaxNode.Language

    Methods

    | Improve this Doc View Source

    Accept(LuaSyntaxVisitor)

    Accepts a visitor into this node.

    Declaration
    public abstract void Accept(LuaSyntaxVisitor visitor)
    Parameters
    Type Name Description
    LuaSyntaxVisitor visitor
    | Improve this Doc View Source

    Accept<TResult>(LuaSyntaxVisitor<TResult>)

    Accepts a visitor into this node.

    Declaration
    public abstract TResult Accept<TResult>(LuaSyntaxVisitor<TResult> visitor)
    Parameters
    Type Name Description
    LuaSyntaxVisitor<TResult> visitor
    Returns
    Type Description
    TResult
    Type Parameters
    Name Description
    TResult
    | Improve this Doc View Source

    DeserializeFrom(Stream, CancellationToken)

    Deserialize a syntax node from the byte stream.

    Declaration
    public static SyntaxNode DeserializeFrom(Stream stream, CancellationToken cancellationToken = null)
    Parameters
    Type Name Description
    Stream stream
    CancellationToken cancellationToken
    Returns
    Type Description
    SyntaxNode
    | Improve this Doc View Source

    FindToken(Int32, Boolean)

    Finds a token according to the following rules:

    1. If position matches the End of the node/s FullSpan and the node is CompilationUnit, then EoF is returned.

    2. If node.FullSpan.Contains(position) then the token that contains given position is returned.

    3. Otherwise an ArgumentOutOfRangeException is thrown

    Declaration
    public SyntaxToken FindToken(int position, bool findInsideTrivia = false)
    Parameters
    Type Name Description
    System.Int32 position
    System.Boolean findInsideTrivia
    Returns
    Type Description
    SyntaxToken
    | Improve this Doc View Source

    FindTrivia(Int32, Func<SyntaxTrivia, Boolean>)

    Finds a descendant trivia of this node at the specified position, where the position is within the span of the node.

    Declaration
    public SyntaxTrivia FindTrivia(int position, Func<SyntaxTrivia, bool> stepInto)
    Parameters
    Type Name Description
    System.Int32 position

    The character position of the trivia relative to the beginning of the file.

    Func<SyntaxTrivia, System.Boolean> stepInto

    Specifies a function that determines per trivia node, whether to descend into structured trivia of that node.

    Returns
    Type Description
    SyntaxTrivia
    | Improve this Doc View Source

    FindTrivia(Int32, Boolean)

    Finds a descendant trivia of this node whose span includes the supplied position.

    Declaration
    public SyntaxTrivia FindTrivia(int position, bool findInsideTrivia = false)
    Parameters
    Type Name Description
    System.Int32 position

    The character position of the trivia relative to the beginning of the file.

    System.Boolean findInsideTrivia

    Whether to search inside structured trivia.

    Returns
    Type Description
    SyntaxTrivia
    | Improve this Doc View Source

    GetDiagnostics()

    Gets a list of all the diagnostics in the sub tree that has this node as its root. This method does not filter diagnostics based on #pragmas and compiler options like nowarn, warnaserror etc.

    Declaration
    public IEnumerable<Diagnostic> GetDiagnostics()
    Returns
    Type Description
    IEnumerable<Diagnostic>
    | Improve this Doc View Source

    GetFirstToken(Boolean, Boolean, Boolean, Boolean)

    Gets the first token of the tree rooted by this node.

    Declaration
    public SyntaxToken GetFirstToken(bool includeZeroWidth = false, bool includeSkipped = false, bool includeDirectives = false, bool includeDocumentationComments = false)
    Parameters
    Type Name Description
    System.Boolean includeZeroWidth

    True if zero width tokens should be included, false by default.

    System.Boolean includeSkipped

    True if skipped tokens should be included, false by default.

    System.Boolean includeDirectives

    True if directives should be included, false by default.

    System.Boolean includeDocumentationComments

    True if documentation comments should be included, false by default.

    Returns
    Type Description
    SyntaxToken
    | Improve this Doc View Source

    GetLastToken(Boolean, Boolean, Boolean, Boolean)

    Gets the last non-zero-width token of the tree rooted by this node.

    Declaration
    public SyntaxToken GetLastToken(bool includeZeroWidth = false, bool includeSkipped = false, bool includeDirectives = false, bool includeDocumentationComments = false)
    Parameters
    Type Name Description
    System.Boolean includeZeroWidth

    True if zero width tokens should be included, false by default.

    System.Boolean includeSkipped

    True if skipped tokens should be included, false by default.

    System.Boolean includeDirectives

    True if directives should be included, false by default.

    System.Boolean includeDocumentationComments

    True if documentation comments should be included, false by default.

    Returns
    Type Description
    SyntaxToken
    | Improve this Doc View Source

    GetLeadingTrivia()

    The list of trivia that appears before this node in the source code.

    Declaration
    public SyntaxTriviaList GetLeadingTrivia()
    Returns
    Type Description
    SyntaxTriviaList
    | Improve this Doc View Source

    GetLocation()

    Gets a Location for this node.

    Declaration
    public Location GetLocation()
    Returns
    Type Description
    Location
    | Improve this Doc View Source

    GetTrailingTrivia()

    The list of trivia that appears after this node in the source code.

    Declaration
    public SyntaxTriviaList GetTrailingTrivia()
    Returns
    Type Description
    SyntaxTriviaList
    | Improve this Doc View Source

    Kind()

    Returns the SyntaxKind of the node.

    Declaration
    public SyntaxKind Kind()
    Returns
    Type Description
    SyntaxKind

    Implements

    IFormattable

    Extension Methods

    LuaExtensions.IsKind(SyntaxNode, SyntaxKind)
    LuaExtensions.Kind(SyntaxNode)
    • Improve this Doc
    • View Source
    ☀
    ☾
    In This Article
    Back to top

    Copyright (c) LorettaDevs

    Generated by DocFX

    ☀
    ☾