Commit Graph

10 Commits

Author SHA1 Message Date
Laurenz 5e08028fb3 Syntax functions 🚀
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
2021-03-21 17:50:56 +01:00
Laurenz 264a7dedd4 Scheduled maintenance 🔨
- 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
2021-03-19 17:57:31 +01:00
Laurenz 5157c1e276 Documentation fixes ✔ 2021-03-03 23:32:29 +01:00
Laurenz c94a18833f Closures and function definitions 🚀
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 `..`
2021-03-03 17:53:40 +01:00
Laurenz a2fcc1bf28 Small fixes ♻ 2021-02-11 22:24:42 +01:00
Laurenz 06ca740d01 Split evaluation and execution 🔪 2021-02-09 19:46:57 +01:00
Laurenz e35bbfffcb Remove captured expression 🗑️ 2021-02-07 13:39:05 +01:00
Laurenz c80e13579f Dry-clean visitor with a macro 🏜 2021-02-07 13:14:28 +01:00
Laurenz 5943f552e5 Capture variable by slot instead of value 🎣 2021-01-30 16:19:57 +01:00
Laurenz ac24075469 Moves captures visitor into separate file 🚚 2021-01-30 10:24:51 +01:00