def leaf_doc
bend-lint-rules@0.2.0.0 · layout/format.bend:1434
import bend-lint-rules@0.2.0.0/layout/format.bend as Format
import Base
1434def leaf_doc(+t: Token) -> Doc:
1435 match t:
1436 case Token{text, beg, end, col, Newline{}, sym, name, tail, from}:
1437 nothing()
1438 case Token{+text, beg, end, col, Comment{}, sym, name, tail, from}:
1439 str(comment_text(text, text))
1440 case Token{text, beg, end, col, Literal{}, sym, name, tail, from}:
1441 str(text)
1442 case Token{text, beg, end, col, Code{}, sym, name, tail, from}:
1443 code(t)