java.lang.Object
org.openrewrite.javascript.internal.tsc.TSCNode
All Implemented Interfaces:
TSCV8Backed
Direct Known Subclasses:
TSCNode.SourceFile, TSCNode.TypeNode, TSCSyntaxListNode

public class TSCNode extends Object implements TSCV8Backed
  • Field Details

    • nodeV8

      public final com.caoccao.javet.values.reference.V8ValueObject nodeV8
  • Constructor Details

    • TSCNode

      protected TSCNode(TSCProgramContext programContext, com.caoccao.javet.values.reference.V8ValueObject nodeV8)
  • Method Details

    • getProgramContext

      public TSCProgramContext getProgramContext()
      Specified by:
      getProgramContext in interface TSCV8Backed
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • syntaxKindCode

      public int syntaxKindCode()
    • syntaxKind

      public TSCSyntaxKind syntaxKind()
    • getTypeForNode

      @Nullable public @Nullable TSCType getTypeForNode()
    • firstNodeContaining

      public TSCNode firstNodeContaining(String text)
    • firstNodeContaining

      public TSCNode firstNodeContaining(String text, @Nullable @Nullable TSCSyntaxKind kind)
    • firstNodeWithText

      public TSCNode firstNodeWithText(String text)
    • firstNodeWithTextOrNull

      @Nullable public @Nullable TSCNode firstNodeWithTextOrNull(String text)
    • findNodeAtPosition

      @Nullable public @Nullable TSCNode findNodeAtPosition(int position)
      Only intended for debugging and tests.
    • containsPosition

      public boolean containsPosition(int position)
    • getSymbolForNode

      @Nullable public @Nullable TSCSymbol getSymbolForNode()
    • getStartWithLeadingSpace

      public int getStartWithLeadingSpace()
    • getStart

      public int getStart()
    • getEnd

      public int getEnd()
    • getChildCount

      public int getChildCount()
    • getParent

      @Nullable public @Nullable TSCNode getParent()
    • nearestContainingNamedDeclaration

      @Nullable public @Nullable TSCNode nearestContainingNamedDeclaration()
    • nearestContainingNamedDeclarationOrNull

      @Nullable public @Nullable TSCNode nearestContainingNamedDeclarationOrNull()
    • getChildNode

      @Deprecated @Nullable public @Nullable TSCNode getChildNode(String name)
      Deprecated.
    • getChildNodeRequired

      @Deprecated public TSCNode getChildNodeRequired(String name)
      Deprecated.
    • getChildNodes

      @Deprecated public List<TSCNode> getChildNodes(String name)
      Deprecated.
    • getSourceFile

      public TSCNode.SourceFile getSourceFile()
    • assertSourceFile

      public TSCNode.SourceFile assertSourceFile()
    • getText

      public String getText()
    • assertTypeNode

      public TSCNode.TypeNode assertTypeNode()
    • getAllChildNodes

      public List<TSCNode> getAllChildNodes()
    • printTree

      public void printTree(PrintStream ps)
    • getBackingV8Object

      public com.caoccao.javet.values.reference.V8ValueObject getBackingV8Object()
      Specified by:
      getBackingV8Object in interface TSCV8Backed