Commit Graph

376 Commits

Author SHA1 Message Date
Laurenz 94b375ce55 Incremental renumbering 2022-06-01 13:49:02 +02:00
Laurenz 0a9172cb15 Enforce and make use of span ordering 2022-05-31 13:19:09 +02:00
Laurenz 9bbebd69dd Numbered spans 2022-05-31 12:37:05 +02:00
Laurenz 08a6188123 Remove green/red distinction 2022-05-31 10:40:30 +02:00
Laurenz c9b72aaa84 More highlighting API 2022-05-20 10:04:49 +02:00
Laurenz fcce3df093 Simplify `only_in_mode` to `only_in_markup` 2022-05-19 13:56:14 +02:00
Laurenz 3965e10281 Hack in ReX for now 2022-05-18 19:09:57 +02:00
Laurenz 242b01549a Safe `eval` function 2022-05-16 20:22:48 +02:00
Laurenz 1bca9ccecb Improve diagnostics 2022-05-04 23:26:15 +02:00
Laurenz 2a45650dcc Keyed pairs 2022-05-04 23:12:31 +02:00
Laurenz e674fd7e90 New raw theme & nicer debug representation 2022-05-04 22:14:57 +02:00
Laurenz d59109e8ff Support recursive show rules 2022-05-03 15:58:15 +02:00
Laurenz f9e115daf5 New block spacing model 2022-04-30 14:12:28 +02:00
Laurenz 2f33ad0e0a Rename soft linebreak to justified linebreak 2022-04-24 21:38:23 +02:00
Laurenz 04fb8b288a Show rules with type ascribed object 2022-04-23 21:55:58 +02:00
Laurenz 7a2cc3e7d2 Field access 2022-04-19 16:37:16 +02:00
Laurenz 4494b443bb Ellipsis 2022-04-16 23:06:47 +02:00
Laurenz 67e9313b91 Soft breaks and shy hyphens 2022-04-13 14:48:19 +02:00
Laurenz f7875032b7 Small highlighting improvement 2022-04-13 11:34:44 +02:00
Martin Haug 072543fc59 Introduce `NodeKind::Quote` 2022-04-12 22:35:04 +02:00
Laurenz 938b0af889 Spreading into arrays and dictionaries 2022-04-11 15:52:57 +02:00
Laurenz 790bd536eb Fix incremental bugs
Co-Authored-By: Martin Haug <mhaug@live.de>
2022-04-11 15:39:32 +02:00
Laurenz 712c00ecb7 Em units 2022-04-08 15:45:14 +02:00
Laurenz beca01c826 Methods 2022-03-18 23:43:58 +01:00
Laurenz 77d153d315 Add `in` and `not in` operators 2022-03-15 15:27:36 +01:00
Laurenz 2890a156d2 Remove classes and improve naming 2022-03-12 14:24:24 +01:00
Laurenz 5ac7eb3860 Rename template to content 2022-03-11 23:36:06 +01:00
Laurenz 5ce2a006b6 Consistent block naming 2022-03-11 12:22:27 +01:00
Martin Haug 9fda623b02 Code Review: That's just like your struct, man. 2022-02-23 20:49:47 +01:00
Martin Haug 4c8634c600 Early stop for falling indents.
Fix code edits and at_start handling.
Also fix dedenting for multi-byte chars in raw blocks.
2022-02-23 14:50:38 +01:00
Martin Haug aac3afcba8 Remove `Parbreak` as a `NodeKind` 2022-02-21 13:48:21 +01:00
Laurenz e01970b20a Basic show rules 2022-02-18 16:57:53 +01:00
Laurenz 91e45458e3 Make values hashable 2022-02-17 12:50:54 +01:00
Laurenz 20b1a38414 Switch from `Rc` to `Arc` 2022-01-31 16:47:00 +01:00
Laurenz 490819a3d0 Reorder succession rules 2022-01-31 11:05:59 +01:00
Laurenz 8d1ce390e2 Rework strong and emph
- Star and underscore not parsed as strong/emph inside of words
- Stars/underscores must be balanced and they cannot go over paragraph break
- New `strong` and `emph` classes
2022-01-30 22:46:59 +01:00
Laurenz 9c906f92c5 Parse `break`, `continue` and `return` expression 2022-01-28 21:01:36 +01:00
Laurenz 3a07603b66 Remove unnecessary group 2022-01-28 20:17:30 +01:00
Laurenz 76b1d4a93f Parse `show` and `wrap` expressions 2022-01-28 20:02:42 +01:00
Laurenz c183ed3c15 Mutex comes from tex and we don't want any 2022-01-27 23:07:10 +01:00
Martin Haug 4f66907d08 Add Code Block syntax highlighting 2022-01-27 22:04:45 +01:00
Laurenz 3739ab7720 Export into rendered images 2022-01-24 17:39:49 +01:00
Laurenz b3062ee880 Make use of new Rust 1.58 formatting feature 2022-01-13 18:43:18 +01:00
Martin Haug c994cfa7d8 Code Review: Your parsers were so preoccupied with whether they could 2022-01-04 00:21:33 +01:00
Martin Haug 5f114e18eb Added a test framework for incremental parsing
Fix several errors:

- Indented markup is now reparsed right
- All end group errors will now fail a reparse
- Rightmost errors will always fail a reparse
2022-01-02 00:46:19 +01:00
Martin Haug e05eb5fda5 Code Review: Parser, I can't let you do this 2021-11-28 18:18:45 +01:00
Martin Haug edc686d738 Make incremental parsing simpler and move it somewhere else 2021-11-27 16:10:22 +01:00
Martin Haug fdb9d0743d Refactoring and bugfixes 2021-11-18 16:21:45 +01:00
Martin Haug 3162c6a83a Comments and neighbors 2021-11-10 20:41:10 +01:00
Martin Haug 91f2f97572 Multiple replacements, escapes 2021-11-09 13:34:23 +01:00
Martin Haug 7a631d8b09 Simplify node mode management 2021-11-09 13:07:55 +01:00
Martin Haug 9141cba6a9 Deal with the effects of keywords 2021-11-08 12:01:35 +01:00
Martin Haug 0663758fbb Tests
- length updates
- dealing with keywords and comments
2021-11-07 19:43:01 +01:00
Martin Haug eba7fc34ef Incremental-safety based approach 2021-11-06 16:07:21 +01:00
Martin Haug 7016ab0d12 Make stuff more elegant 2021-11-03 11:03:00 +01:00
Martin Haug 1e4cab393e Introduce incremental parsing 2021-11-02 12:06:22 +01:00
Laurenz f5dcb84e36 Make clippy a bit happier 2021-12-30 12:00:12 +01:00
Laurenz 11565a40b3 Set Rules Episode IX: The Rise of Testing 2021-12-21 00:20:24 +01:00
Laurenz 2a3d0f4b39 Set Rules Episode VII: The Set Awakens 2021-12-15 20:27:41 +01:00
Martin Haug 738ff7e1f5 Reduce the size of the `FramesEntry` struct and bump edition 2021-12-13 15:56:14 +01:00
Laurenz f3bdc9d3da Syntax highlighting 2021-11-30 18:55:50 +01:00
Laurenz 304d9dd110 Small style changes 2021-11-24 17:00:10 +01:00
Laurenz 63c274e7f6 Make clippy happier and remove `Str` 2021-11-15 17:06:43 +01:00
Laurenz 38c5c36241 Final touches 2021-11-08 13:06:11 +01:00
Laurenz 75fffc1f9b Fine-grained capturing 2021-11-08 11:52:09 +01:00
Laurenz 95866d5fc9 Tidy up AST 2021-11-08 01:37:49 +01:00
Laurenz 41bdafb578 Faster parser 2021-11-06 15:49:39 +01:00
Martin Haug cf2e527a02 Code Review: No Patrick, question marks are not an instrument 2021-11-05 13:46:41 +01:00
Martin Haug 5c952d56d0 New error handling 2021-11-05 13:46:41 +01:00
Laurenz f0c9635db5 Notes 2021-11-05 13:46:41 +01:00
Laurenz 65fac0e57c Refactoring
Co-Authored-By: Martin <mhaug@live.de>
2021-11-05 13:46:41 +01:00
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 3968181622 Replace `..` syntax with `range` function 2021-10-25 13:38:32 +02:00
Laurenz 4b2c6334d0 Change precedence of range expression 2021-10-05 17:19:48 +02:00
Laurenz 9e78dbe525 Better function and closure pretty printing 2021-09-30 19:07:17 +02:00
Laurenz 6d26e15fbe Support `else if` 2021-09-30 19:07:06 +02:00
Laurenz 9e95502622 No hashtag before else anymore 2021-09-30 18:28:25 +02:00
Laurenz ea921aca5d Blocks directly in template also scope 2021-09-15 13:12:07 +02:00
Laurenz 5de791d9e6 Rename `SyntaxTree` to `Markup`
Also `SyntaxNode` -> `MarkupNode`.
2021-09-15 13:05:01 +02:00
Laurenz c18321a4c2 Bugfix and tidying 2021-09-15 13:05:00 +02:00
Laurenz 7f48e8fe66 Make user-facing "debug" representation use Debug instead of Display 2021-08-31 16:25:12 +02:00
Laurenz 0dd4ae0a7a Prune derives 2021-08-21 17:30:21 +02:00
Laurenz 594809e35b Library functions behave more imperatively
- Templates scope state changes
- State-modifying function operate in place instead of returning a template
- Internal template representation contains actual owned nodes instead of a pointer to a syntax tree + an expression map
- No more wide calls
2021-08-17 22:20:37 +02:00
Laurenz 9462fb17b3 Convert single-field structs to tuple structs 2021-08-16 19:15:03 +02:00
Laurenz 7e6e7e928c Adjust macros to new version 2021-08-14 23:53:57 +02:00
Laurenz 6ae6d86b9c Separate type for string values 2021-08-14 15:55:39 +02:00
Laurenz f6814b7732 Optimize memory sizes 2021-08-13 18:17:24 +02:00
Laurenz 6a3385e4e7 Argument collection and spreading 2021-08-13 16:55:45 +02:00
Laurenz 144f208821 Add file information to spans 2021-08-13 14:33:58 +02:00
Laurenz d002cdf451 Named arguments for user defined functions 2021-08-12 16:07:42 +02:00
Laurenz ccb4be4da4 Make range-end exclusive 2021-08-12 14:54:52 +02:00
Laurenz eaa3cbaa9c Array and dictionary indexing 2021-08-12 13:56:23 +02:00
Laurenz 3c92bad9a7 Pretty-printed diagnostics with traceback 2021-08-01 00:00:36 +02:00