Module aya.ide

Interface SyntaxNodeAction<Location>

All Superinterfaces:
Consumer<org.aya.concrete.stmt.Stmt>, org.aya.concrete.visitor.EndoExpr, org.aya.concrete.visitor.EndoPattern, Function<org.aya.concrete.Expr,org.aya.concrete.Expr>, org.aya.concrete.visitor.StmtConsumer, UnaryOperator<org.aya.concrete.Expr>
All Known Subinterfaces:
SyntaxNodeAction.Cursor, SyntaxNodeAction.Ranged
All Known Implementing Classes:
ComputeTerm, InlayHints

public interface SyntaxNodeAction<Location> extends org.aya.concrete.visitor.StmtConsumer, org.aya.concrete.visitor.EndoPattern
Ignore the traversal of definitions and large expressions when they don't contain the location.
Implementation Note:
This does not modify the AST.
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Interface
    Description
    static interface 
    Need to visit the decl/expr placed at the cursor position XY
    static interface 
    Need to visit all decls inside XYXY range
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    accept(Location xy, @NotNull org.aya.util.error.SourcePos sourcePos)
     
    default void
    accept(@NotNull org.aya.concrete.stmt.Stmt stmt)
     
    default @NotNull org.aya.concrete.Expr
    apply(@NotNull org.aya.concrete.Expr expr)
     
     

    Methods inherited from interface java.util.function.Consumer

    andThen

    Methods inherited from interface org.aya.concrete.visitor.EndoExpr

    post, pre

    Methods inherited from interface org.aya.concrete.visitor.EndoPattern

    apply, post, pre

    Methods inherited from interface java.util.function.Function

    andThen, compose

    Methods inherited from interface org.aya.concrete.visitor.StmtConsumer

    visitTelescopic
  • Method Details

    • location

      @NotNull Location location()
    • accept

      boolean accept(@NotNull Location xy, @NotNull @NotNull org.aya.util.error.SourcePos sourcePos)
    • accept

      default void accept(@NotNull @NotNull org.aya.concrete.stmt.Stmt stmt)
      Specified by:
      accept in interface Consumer<Location>
      Specified by:
      accept in interface org.aya.concrete.visitor.StmtConsumer
    • apply

      @NotNull default @NotNull org.aya.concrete.Expr apply(@NotNull @NotNull org.aya.concrete.Expr expr)
      Specified by:
      apply in interface org.aya.concrete.visitor.EndoExpr
      Specified by:
      apply in interface Function<org.aya.concrete.Expr,org.aya.concrete.Expr>