模块 aya.base

接口 Decl

所有超级接口:
AyaDocile, org.aya.util.binop.OpDecl, org.aya.util.error.SourceNode, Stmt, TyckUnit
所有已知实现类:
ClassDecl, CommonDecl, TeleDecl, TeleDecl.DataCtor, TeleDecl.DataDecl, TeleDecl.FnDecl, TeleDecl.PrimDecl, TeleDecl.StructDecl, TeleDecl.StructField

public sealed interface Decl extends org.aya.util.binop.OpDecl, org.aya.util.error.SourceNode, TyckUnit, Stmt permits CommonDecl
Generic concrete definitions, corresponding to GenericDef. Concrete definitions can be varied in the following ways: We say these are properties of a concrete definition and should be implemented selectively.

There are some commonalities between concrete definitions: they all have source positions, names, operator info and statement accessibility. These common parts are extracted into CommonDecl for all concrete definitions, TeleDecl for all top-level telescopic concrete definitions and ClassDecl for all top-level class-able concrete definitions.

For visitors that may need to visit a certain property, it is recommended to provide an extra proof object that implements the property. For example, visiting a Decl.Telescopic concrete definition requires a proof object of type Decl.Telescopic in addition to the original definition object of type Decl. Checkout StmtOps.visitTelescopic(Decl, Telescopic, Object) for detailed code example.

另请参阅:
  • 嵌套类概要

    嵌套类
    修饰符和类型
    接口
    说明
    static enum 
     
    static interface 
    Denotes that the definition has a result type
    static interface 
    Denotes that the definition is telescopic
    static interface 
    Denotes that the definition can be defined at top-level

    从接口继承的嵌套类/接口 org.aya.util.binop.OpDecl

    org.aya.util.binop.OpDecl.BindPred, org.aya.util.binop.OpDecl.OpInfo

    从接口继承的嵌套类/接口 org.aya.concrete.stmt.Stmt

    Stmt.Accessibility
  • 字段概要

    从接口继承的字段 org.aya.util.binop.OpDecl

    APPLICATION
  • 方法概要

    修饰符和类型
    方法
    说明
     
    @NotNull BindBlock
     
    @NotNull org.aya.util.error.SourcePos
     
    default boolean
    needTyck(@NotNull kala.collection.immutable.ImmutableSeq<String> currentMod)
     
    @Nullable org.aya.util.binop.OpDecl.OpInfo
     
    @NotNull DefVar<?,?>
    ref()
     

    从接口继承的方法 org.aya.generic.AyaDocile

    debuggerOnlyToDoc

    从接口继承的方法 org.aya.util.error.SourceNode

    sourcePos

    从接口继承的方法 org.aya.concrete.stmt.Stmt

    desugar, toDoc
  • 方法详细资料

    • accessibility

      @NotNull @NotNull Stmt.Accessibility accessibility()
      指定者:
      accessibility 在接口中 Stmt
    • ref

      @Contract(pure=true) @NotNull @NotNull DefVar<?,?> ref()
    • bindBlock

      @NotNull @NotNull BindBlock bindBlock()
    • opInfo

      @Nullable @Nullable org.aya.util.binop.OpDecl.OpInfo opInfo()
      指定者:
      opInfo 在接口中 org.aya.util.binop.OpDecl
    • entireSourcePos

      @NotNull @NotNull org.aya.util.error.SourcePos entireSourcePos()
    • needTyck

      default boolean needTyck(@NotNull @NotNull kala.collection.immutable.ImmutableSeq<String> currentMod)
      指定者:
      needTyck 在接口中 TyckUnit