Module aya.base

Interface EndoExpr

All Superinterfaces:
EndoPattern, Function<Expr,Expr>, UnaryOperator<Expr>
All Known Subinterfaces:
StmtConsumer
All Known Implementing Classes:
Desugarer, ExprResolver

public interface EndoExpr extends UnaryOperator<Expr>, EndoPattern
A convenient interface to obtain an endomorphism on `Expr`. One can specify the `pre` and `post` method which represents a recursive step in pre- and post-order respectively. Additionally, one can define `pre` and `post` logic on patterns as well, since we extend `EndoPattern` here.
  • Method Summary

    Modifier and Type
    Method
    Description
    default @NotNull Expr
    apply(@NotNull Expr expr)
     
    default @NotNull Expr
    post(@NotNull Expr expr)
     
    default @NotNull Expr
    pre(@NotNull Expr expr)
     

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

    apply, post, pre

    Methods inherited from interface java.util.function.Function

    andThen, compose
  • Method Details

    • pre

      @NotNull default @NotNull Expr pre(@NotNull @NotNull Expr expr)
    • post

      @NotNull default @NotNull Expr post(@NotNull @NotNull Expr expr)
    • apply

      @NotNull default @NotNull Expr apply(@NotNull @NotNull Expr expr)
      Specified by:
      apply in interface Function<Expr,Expr>