2017-09-29

(sph lang scm-format format)

formatters for individual expressions

import name

(sph lang scm-format format)

exports

format-application

procedure

signature

a config current-indent ->

list hashtable integer -> string

description

format the standard list application form. example (append a b)

format-docstring

procedure

signature

a offset-doublequote indent-string current-indent ->

string hashtable integer -> string

description

parses a string and removes outside string indent from using newlines in a continuous string that is indented.

adds current indent to all lines except the first.

since old-indent is not available here, old-indent is guessed from the second line.

if the second line is indented relative to the first line, this indent will unfortunately be removed for all lines

format-hash-bang

procedure

signature

a recurse config current-indent ->

format-lambda

procedure

signature

a recurse config current-indent ->

format-let

procedure

signature

a recurse config current-indent ->

format-library

procedure

signature

a recurse config current-indent ->

list procedure hashtable integer -> string

format-list

procedure

signature

a config current-indent start middle end ->

format-list-assoc

procedure

signature

a recurse config current-indent ->

format-list-f

procedure

signature

start mid end ->

integer integer integer -> procedure:{any:expression recurse config indent -> (result false)}

return a function for descend-prefix ->

description

format-f that formats a list with the given start/mid/end expression distribution

format-quasiquote

procedure

signature

a ... ->

format-quasisyntax

procedure

signature

a ... ->

format-quote

procedure

signature

a ... ->

format-range-comment

procedure

signature

a recurse config current-indent ->

format-scsh-block-comment

procedure

signature

a recurse config current-indent ->

format-semicolon-comment

procedure

signature

a recurse config current-indent ->

format-string

procedure

signature

a rest ... ->

format-syntax

procedure

signature

a ... ->

format-test-module

procedure

signature

a recurse config current-indent ->

list procedure hashtable integer -> string

format-unquote

procedure

signature

a ... ->

format-unsyntax

procedure

signature

a ... ->

string-join-with-vertical-spacing

procedure

signature

a indent vertical-spacing vertical-spacing-oneline ->

(string ...) string string string -> string

description

join expressions eventually with empty lines inbetween them


tags: guile documentation library scheme sph-lib computer sph-lang-scm-format-format