summaryrefslogtreecommitdiff
path: root/src/func.rs
AgeCommit message (Collapse)Author
2020-08-16Add Value type and replace dyn-nodes with call-exprs ๐Ÿ—Laurenz
- In addition to syntax trees there are now `Value`s, which syntax trees can be evaluated into (e.g. the tree is `5+5` and the value is `10`) - Parsing is completely pure, function calls are not parsed into nodes, but into simple call expressions, which are resolved later - Functions aren't dynamic nodes anymore, but simply functions which receive their arguments as a table and the layouting context - Functions may return any `Value` - Layouting is powered by functions which return the new `Commands` value, which informs the layouting engine what to do - When a function returns a non-`Commands` value, the layouter simply dumps the value into the document in monospace
2020-08-16Remove tuples and objects in favor of tables ๐Ÿ›ขLaurenz
This refactores the parser tests to make them more concise and flexible with regards to spans.
2020-08-15Rename Value trait into TryFromExpr โœ’Laurenz
2020-08-14Desugar body into last argument ๐ŸฉLaurenz
2020-08-14Always parse bodies as syntax trees ๐ŸŒณLaurenz
Previously they were passed as strings to the function parser, now they are parsed and then passed as trees to the function. This allows making bodies sugar for a last content argument. While it removes some flexibility allowing function to parse arbitrary syntaxes in their bodies, these can be modelled as (raw) string arguments.
2020-08-04Refactor function parsing โ™ปLaurenz
2020-08-03Formatting, documentation and small improvements ๐ŸงฝLaurenz
2020-08-02Replace body! macro with functions ๐ŸงฐLaurenz
2020-08-02Refactor model into tree ๐Ÿ›’Laurenz
2020-08-02Refactor argument parsing ๐Ÿ”ฌLaurenz
2020-07-29Move, rename and switch some things (boring) ๐ŸššLaurenz
- Problems -> Diagnostics - Position -> Pos - offset_spans -> Offset trait - Size -> Length (and some more size types renamed) - Paper into its own module - scope::Parser -> parsing::CallParser - Create `Decorations` alias - Remove lots of double newlines - Switch from f32 to f64
2020-07-27Refactor parser ๐Ÿš‡Laurenz
2020-07-26Rename errors to problems and make error! macro more ergonomic ๐ŸงผLaurenz
Also adds a `warning!` macro.
2020-07-18Remove duplicate spans for func args โŒLaurenz
2020-02-09Write lots of parser tests ๐ŸŒชLaurenz
2020-02-04Serialize layouts with serde ๐Ÿ” Laurenz
2020-02-04Merge `Parsed` and `Layouted` types into `Pass` with `Feedback` ๐ŸŒ๐ŸŽข๐ŸŒšLaurenz
2020-02-04Adapt for tonty and fix a few bugs ๐ŸšงLaurenz
2020-02-03Upgrade to new toddle interface ๐ŸณLaurenz
2020-01-26Document everything ๐Ÿ“œLaurenz
2020-01-24Reorganize modules ๐ŸงฑLaurenz
2019-10-23Introduce a set of macros for writing functions more concisely ๐ŸŽLaurenz
2019-10-22Add spacing functions ๐Ÿ”›Laurenz
2019-10-17Create basic box and line-break functions ๐Ÿ“ฆLaurenz
2019-10-17Add pagebreak function โญLaurenz
2019-10-17Implement context-modifying align ๐ŸงฉLaurenz
2019-10-13Run rustfmt ๐ŸšฟLaurenz
2019-10-13Reformat some things ๐ŸงบLaurenz
2019-10-13Move functions to command-based architecture โœˆLaurenz
2019-10-13Refactor layout types ๐ŸšงLaurenz
2019-10-10Add standard `align` function and support right-alignment โžก๏ธLaurenz
2019-10-09Extract into separate repository ๐ŸงฑLaurenz
2019-06-22Add monospace syntax ๐Ÿ“ฐLaurenz
2019-06-22Unify font classes + By-value-contexts โš–Laurenz
2019-06-22Implement function layouting โœ’Laurenz
2019-05-26Thoroughly improve documentation ๐Ÿ“Laurenz
2019-05-24Restructure engine into modular layouter ๐Ÿ‚Laurenz
2019-05-20Unify parsing and typesetting functions. ๐Ÿ—ณLaurenz
2019-05-01Simplify the parsing model ๐Ÿ”‹Laurenz
2019-05-01Require scope for parser โ™ปLaurenz
2019-04-29Improve code quality ๐ŸŽซLaurenz
2019-04-29Make parse tokens more static and efficient ๐Ÿ—œLaurenz
2019-04-29Remove stack from parser โ™ปLaurenz
2019-04-29Simple dynamic, scoped function parsing ๐Ÿ“ฅLaurenz