atproto_sdl/printer/render
Generic string-rendering primitives shared by the rest of printer/*:
quoting/escaping, doc-comment and indentation formatting, and the
small @name(args) attribute renderers. No atproto_lexicon/ast
dependency at all, only stdlib, since none of this is specific to
any particular AST shape.
Values
pub fn attrs_suffix(attrs: List(String)) -> String
pub fn bool_str(v: Bool) -> String
pub fn desc_attr(
desc: option.Option(String),
attrs: List(String),
) -> List(String)
A @description(...) attribute prepended to an existing attribute
list, used wherever a construct’s own description has no doc-comment
slot to live in (array items, params).
pub fn doc_comment(desc: option.Option(String)) -> String
pub fn indent(text: String) -> String
pub fn int_list_attr(
name: String,
vs: option.Option(List(Int)),
) -> option.Option(String)
pub fn pair_attr(
name: String,
min: option.Option(Int),
max: option.Option(Int),
) -> option.Option(String)
pub fn quote(s: String) -> String
pub fn single_int_attr(
name: String,
v: option.Option(Int),
) -> option.Option(String)
pub fn string_list_attr(
name: String,
vs: option.Option(List(String)),
) -> option.Option(String)
pub fn value_attr(
v: option.Option(a),
render: fn(a) -> String,
) -> option.Option(String)