def joins.of

bend-lint-rules@0.2.0.0 · layout/format.bend:2037

import bend-lint-rules@0.2.0.0/layout/format.bend as Format
import Base

2037# Records
2038# -------
2039def joins.of(+p: Tree, +next: Tree, following: Maybe<&2, Tree>) -> Bool:
2040  Bool.not(
2041    is_comment(last(p))
2042  )
2043    && Bool.not(is_comment(first(next)))
2044    && (
2045      (
2046        Bool.not(
2047          is_glued_prefix(first(next), following)
2048        )
2049          && is_leaf(next)
2050          && is_operator(Token.sym(first(next)))
2051      )
2052        || is_continued(Token.sym(last(p)))
2053    )

Uses (14)

Used by (1)