Skip to content

Commit

Permalink
Remove leftover comment in TTTlast/Player.pvl. Make indented rhs of o…
Browse files Browse the repository at this point in the history
…perator only apply to implies, and not to all other rassoc operators
  • Loading branch information
bobismijnnaam committed Sep 25, 2024
1 parent 700834f commit 0c0fce9
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@ class Player {
boolean turn;
Returner returner;

// TODO (RR): Remove comment if it works
/* inline */ resource boardPerm() =
resource boardPerm() =
Perm(c00, 1) ** Perm(c01, 1) ** Perm(c02, 1) **
Perm(c10, 1) ** Perm(c11, 1) ** Perm(c12, 1) **
Perm(c20, 1) ** Perm(c21, 1) ** Perm(c22, 1);
Expand Down
4 changes: 2 additions & 2 deletions src/col/vct/col/ast/expr/ExprImpl.scala
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,9 @@ trait ExprImpl[G] extends NodeFamilyImpl[G] with ExprFamilyOps[G] {

def lassoc(left: Expr[_], op: String, right: Expr[_])(
implicit ctx: Ctx
): Doc = Group(assoc(left) <+> op <>> nassoc(right))
): Doc = Group(assoc(left) <+> op <+/> nassoc(right))

def rassoc(left: Expr[_], op: String, right: Expr[_])(
implicit ctx: Ctx
): Doc = Group(nassoc(left) <+> op <>> assoc(right))
): Doc = Group(nassoc(left) <+> op <+/> assoc(right))
}
3 changes: 2 additions & 1 deletion src/col/vct/col/ast/expr/resource/ImpliesImpl.scala
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,6 @@ trait ImpliesImpl[G] extends ImpliesOps[G] {
override def t: Type[G] = right.t

override def precedence: Int = Precedence.IMPLIES
override def layout(implicit ctx: Ctx): Doc = rassoc(left, "==>", right)
override def layout(implicit ctx: Ctx): Doc =
Group(nassoc(left) <+> "==>" <>> assoc(right))
}

0 comments on commit 0c0fce9

Please sign in to comment.