summaryrefslogtreecommitdiff
path: root/src/compute
AgeCommit message (Collapse)Author
2020-10-01Rename compute to eval โœLaurenz
2020-10-01Flatten compute moduleLaurenz
2020-10-01Reorganize ast types ๐Ÿ•Laurenz
2020-10-01Rename table to dict โœLaurenz
2020-10-01Make syntax not depend on parse ๐Ÿ“ฉLaurenz
This would make it possible to split them into two separate crates.
2020-09-30SpanWith trait โ†”Laurenz
2020-09-30Reorganize syntax types into two modules ๐Ÿ“ฆLaurenz
2020-09-27Fix for updated fontdock โœ”Laurenz
2020-09-03Split up parser into multiple files ๐ŸงฑLaurenz
Splits up into: - escaping: resolving of escape sequences - parser: the parsing code - tests: all integrated parsing tests Also moves Ident from the root syntax module into the tree module.
2020-08-30Format everything with rustfmt! ๐Ÿ’šLaurenz
2020-08-27Do as Dolores says โšกLaurenz
2020-08-19Make compute functions possible ๐Ÿ’ปLaurenz
Ships with the amazing new `rgb` function!
2020-08-17Tidy up library functions ๐ŸงบLaurenz
2020-08-17Parse braced expressions and bracketed calls in headers ๐Ÿ—ณLaurenz
- Refactors the tokenizer to be lazy: It does not emit pre-parsed function tokens, but instead allows it's mode to be changed. The modes are tracked on a stack to allow nested compute/typesetting (pop/push). - Introduces delimited groups into the parser, which make it easy to parse delimited expressions without handling the delimiters in the parsing code for the group's content. A group is started with `start_group`. When reaching the group's end (matching delimiter) the eat and peek methods will simply return `None` instead of the delimiter, stopping the content parser and bubbling up the call stack until `end_group` is called to clear up the situation.
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