| Age | Commit message (Collapse) | Author |
|
|
|
|
|
|
|
Was buggy and pretty useless anyway since it couldn't peek into function templates.
|
|
Co-Authored-By: Laurenz <laurmaedje@gmail.com>
|
|
This adds overridable functions that markup desugars into. Specifically:
- \ desugars into linebreak
- Two newlines desugar into parbreak
- * desugars into strong
- _ desugars into emph
- = .. desugars into heading
- `..` desugars into raw
|
|
- New naming scheme
- TextNode instead of NodeText
- CallExpr instead of ExprCall
- ...
- Less glob imports
- Removes Value::Args variant
- Removes prelude
- Renames Layouted to Fragment
- Moves font into env
- Moves shaping into layout
- Moves frame into separate module
|
|
|
|
Supports:
- Closure syntax: `(x, y) => z`
- Shorthand for a single argument: `x => y`
- Function syntax: `let f(x) = y`
- Capturing of variables from the environment
- Error messages for too few / many passed arguments
Does not support:
- Named arguments
- Variadic arguments with `..`
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- Better trimming (only trim at the end if necessary)
- Fixed block-level layouting
- Improved pretty printing
- Flip inline variable to block
- Flip inline variable to display for math formulas
|
|
|
|
- Everything everywhere!
- Blocks with curly braces: {}
- Templates with brackets: []
- Function templates with hashtag: `#[f]`
- Headings with equals sign: `= Introduction`
|
|
|
|
|
|
|
|
|
|
|
|
(does not support key-value patterns yet)
|
|
|
|
Boolean, equality, comparison and assignment expression parsing and evaluation.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- Syntax tree and value pretty printing
- Better value evaluation (top-level strings and content are evaluated plainly, everything else is pretty printed)
|
|
|
|
|
|
- Identifiers are now evaluated as variables instead of being plain values
- Constants like `left` or `bold` are stored as dynamic values containing the respective rust types
- We now distinguish between arrays and dictionaries to make things more intuitive (at the cost of a bit more complex parsing)
- Spans were removed from collections (arrays, dictionaries), function arguments still have spans for the top-level values to enable good diagnostics
|
|
- Simplified scanner code
- Peek eagerly
- Skip whitespace and comments automatically in header mode
- Parse simple block expressions
- Move literal definitions into expression module
- Raw resolving tests
|
|
- No colon between function name and arguments, just whitespace
- "Named" arguments (previously "keyword" arguments) use colon instead of equals sign
|
|
|
|
|
|
|
|
|
|
|
|
- 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
|
|
This refactores the parser tests to make them more concise and flexible with regards to spans.
|