Martin Haug
42afb27cef
Add documentation
2021-11-05 13:44:50 +01:00
Martin Haug
49fb3cd4e2
Code Review: Life is Like a Box of Iterators
2021-11-05 13:44:50 +01:00
Martin Haug
7d34a548cc
Reorganize syntax module
2021-11-05 13:44:50 +01:00
Martin Haug
2e7d359e59
Unicode escape error moved to tokenizer
2021-11-05 13:44:49 +01:00
Martin Haug
c569e14c07
Improve error handling
2021-11-05 13:44:49 +01:00
Martin Haug
1c0ac793d2
Slim NodeKind
memory footprint
2021-11-05 13:44:49 +01:00
Martin Haug
84d35efee3
Less owning, more iterating
2021-11-05 13:44:49 +01:00
Martin Haug
4875633acf
Change parser
2021-11-05 13:44:49 +01:00
Laurenz
5de791d9e6
Rename SyntaxTree
to Markup
...
Also `SyntaxNode` -> `MarkupNode`.
2021-09-15 13:05:01 +02:00
Laurenz
6ae6d86b9c
Separate type for string values
2021-08-14 15:55:39 +02:00
Laurenz
312dcd070c
Move EcoString and OptionExt into util
2021-07-29 11:35:49 +02:00
Laurenz
6a4823461f
Reference-count complex values
...
Rename some nodes types
2021-07-10 23:10:17 +02:00
Laurenz
36b3067c19
Eco string 🌱
2021-07-10 13:07:39 +02:00
Laurenz
470f8001a1
No more collisions between syntax::Tree and layout::Tree
2021-06-30 11:40:27 +02: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
1711b67877
Move all pretty printing into one module and pretty print values 🦋
2021-02-11 17:33:13 +01:00
Laurenz
06ca740d01
Split evaluation and execution 🔪
2021-02-09 19:46:57 +01:00
Laurenz
c80e13579f
Dry-clean visitor with a macro 🏜
2021-02-07 13:14:28 +01:00
Laurenz
8de1f8b770
Fix counting bug ✅
2021-02-04 00:38:30 +01:00
Laurenz
d86a5e8a1f
Tidy up raw blocks 🧹
...
- 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
2021-02-03 21:34:49 +01:00
Laurenz
67047047e8
Interpret two backticks as single-backtick block ✅
2021-01-30 15:24:11 +01:00
Laurenz
89eb8bae49
New syntax 💎
...
- Everything everywhere!
- Blocks with curly braces: {}
- Templates with brackets: []
- Function templates with hashtag: `#[f]`
- Headings with equals sign: `= Introduction`
2021-01-30 12:09:26 +01:00
Laurenz
ac24075469
Moves captures visitor into separate file 🚚
2021-01-30 10:24:51 +01:00
Laurenz
2036663ed2
Capture variables in templates 🔍
2021-01-27 15:05:18 +01:00
Laurenz
710f88ccb2
For loop patterns 🦚
2021-01-26 23:30:03 +01:00
Laurenz
010ddc4795
More straightforward pretty printing tests 🧹
2021-01-26 21:57:56 +01:00
Laurenz
7b4d4d6002
Pretty printing 🦋
...
- Syntax tree and value pretty printing
- Better value evaluation (top-level strings and content are evaluated plainly, everything else is pretty printed)
2021-01-06 01:32:59 +01:00
Laurenz
aae67bd572
Move and rename many things 🚛
2021-01-03 00:12:09 +01:00
Laurenz
4069f0744d
Parsing improvements 🧽
...
- 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
2020-12-31 17:48:56 +01:00
Laurenz
c216a4fc26
Flatten ast module back into syntax module 🌪
2020-10-10 22:41:56 +02:00
Laurenz
d2e220245d
Move deco, pass and feedback into diagnostics module ↩
2020-10-07 18:24:47 +02:00
Laurenz
5a7a32a9ba
Streamline generic layouting primitives 🛫
2020-10-05 16:44:35 +02:00
Laurenz
ef8aa763fa
Shorten some names ↔
2020-10-04 20:22:11 +02:00
Laurenz
75e6dbfbe6
Rename bold/italic to strong/emph ✏
2020-10-03 11:18:25 +02:00
Laurenz
3533268b1f
Refactor parser 🏞
2020-10-02 15:43:29 +02:00
Laurenz
7fcad452b8
Reorganize ast types 🏕
2020-10-01 15:03:37 +02:00
Laurenz
aafd3c95ca
Rename table to dict ✏
2020-10-01 13:15:10 +02:00
Laurenz
885bfec5d7
Make syntax not depend on parse 📩
...
This would make it possible to split them into two separate crates.
2020-10-01 11:32:48 +02:00
Laurenz
7cc279f7ae
Replace line/column with byte positions 🔢
2020-09-30 17:25:09 +02:00
Laurenz
3e791e3337
Move decoration into mod.rs 🔙
2020-09-30 12:49:30 +02:00
Laurenz
bc1b4216a8
Reorganize syntax types into two modules 📦
2020-09-30 12:45:33 +02:00
Laurenz
7f8f225cb3
Split up parser into multiple files 🧱
...
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-09-03 19:16:19 +02:00
Laurenz
181f756a9e
Format everything with rustfmt! 💚
2020-08-30 22:18:55 +02:00
Laurenz
30f16bbf64
Add Value type and replace dyn-nodes with call-exprs 🏗
...
- 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-16 22:39:21 +02:00
Laurenz
9f6137d8a8
Remove tuples and objects in favor of tables 🛢
...
This refactores the parser tests to make them more concise and flexible with regards to spans.
2020-08-16 14:38:30 +02:00
Laurenz
1a0608930c
Rename Value trait into TryFromExpr ✒
2020-08-15 11:44:18 +02:00
Laurenz
2467cd6272
Refactor function parsing ♻
2020-08-04 13:48:07 +02:00
Laurenz
dbfb3d2ced
Formatting, documentation and small improvements 🧽
2020-08-03 16:04:55 +02:00
Laurenz
5a8f2fb73d
Replace body! macro with functions 🧰
2020-08-02 22:21:58 +02:00
Laurenz
266d457292
Refactor model into tree 🛒
2020-08-02 22:05:49 +02:00