Skip to content

Commit

Permalink
save
Browse files Browse the repository at this point in the history
  • Loading branch information
mio-19 committed Oct 27, 2024
1 parent b4a2c09 commit 965a621
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions syntax/src/main/scala/chester/syntax/core/Term.scala
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ case class TermMeta(sourcePos: SourcePos) derives ReadWriter

type OptionTermMeta = Option[TermMeta]

@FunctionalInterface
trait CallingArgTermF[Rec <: TermT[Rec], ThisTree <: CallingArgTermC[Rec]] {
def apply(value: Rec, ty: Rec, name: Option[Name], vararg: Boolean, meta: OptionTermMeta): ThisTree
}
Expand Down Expand Up @@ -63,6 +64,7 @@ case class CallingArgTerm(
copy(value = f(value), ty = f(ty))
}

@FunctionalInterface
trait CallingF[Rec <: TermT[Rec], ThisTree <: CallingC[Rec]] {
def apply(args: Vector[CallingArgTermC[Rec]], implicitly: Boolean, meta: OptionTermMeta): ThisTree
}
Expand Down Expand Up @@ -97,6 +99,7 @@ case class Calling(
override def descent(f: Term => Term, g: TreeMap[Term]): Calling = copy(args = args.map(g))
}

@FunctionalInterface
trait FCallTermF[Rec <: TermT[Rec], ThisTree <: FCallTermC[Rec]] {
def apply(f: Rec, args: Vector[CallingC[Rec]], meta: OptionTermMeta): ThisTree
}
Expand Down

0 comments on commit 965a621

Please sign in to comment.