Module polar_core::formatting [−][src]
Expand description
Formatting
There are three main forms of formatting within Polar:
- Debug strings: super verbose, mostly Rust-auto derived from fmt::Debug trait
- Display string: nice user-facing versions, which could be used for things like a debugger
- Polar strings: not always implemented, but is same syntax the parser accepts
In addition, there are special cases like traces and sources that have their own formatting requirements.
Re-exports
Modules
Functions
Formats a vector of terms as a string-separated list When providing an operator, parentheses are applied suitably (see: to_polar_parens)
Formats a vector of parameters
Formats a vector of rules as a string-separated list.
Traverse a Source
line by line until offset
is reached,
and return the source line containing the offset
character as well as num_lines
lines
above and below it.