Commit Graph

60 Commits

Author SHA1 Message Date
Martin Haug eba7fc34ef Incremental-safety based approach 2021-11-06 16:07:21 +01:00
Laurenz f5dcb84e36 Make clippy a bit happier 2021-12-30 12:00:12 +01:00
Laurenz 2a3d0f4b39 Set Rules Episode VII: The Set Awakens 2021-12-15 20:27:41 +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 95866d5fc9 Tidy up AST 2021-11-08 01:37:49 +01:00
Laurenz 8117ca9950 Deduplicate trivia search 2021-11-06 15:49:39 +01:00
Laurenz 41bdafb578 Faster parser 2021-11-06 15:49:39 +01:00
Laurenz 515fe89c5e Style changes
Co-Authored-By: Martin <mhaug@live.de>
2021-11-05 13:46:42 +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 2e7d359e59 Unicode escape error moved to tokenizer 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 9e95502622 No hashtag before else anymore 2021-09-30 18:28:25 +02:00
Laurenz 0dd4ae0a7a Prune derives 2021-08-21 17:30:21 +02:00
Laurenz 144f208821 Add file information to spans 2021-08-13 14:33:58 +02:00
Laurenz 8207c31aec Minor refactorings
- Reorder parser methods and use `Pos` everywhere
- Remove tab special handling for columns and adapt heading/list/enum indent handling
- Don't panic when a file has an empty path
2021-08-10 11:28:12 +02:00
Laurenz 3932bb2cb9 New source loading architecture 2021-08-09 11:26:41 +02:00
Laurenz 3c92bad9a7 Pretty-printed diagnostics with traceback 2021-08-01 00:00:36 +02:00
Laurenz 1ee1d078e2 Fatal errors
- Makes errors fatal, so that a phase is only reached when all previous phases were error-free
- Parsing still recovers and can produce multiple errors
- Evaluation fails fast and can thus produce only a single error (except for parse errors due to an import)
- The single error that could occur during execution is removed for now
- Removes Value::Error variant
2021-07-30 18:49:19 +02:00
Laurenz 5edbd3a5b5 Use array's IntoIterator impl and nested or patterns
*yay*
2021-07-16 12:07:15 +02:00
Laurenz 891e0c5fa6 Remove warnings from parsing and casting 2021-07-10 23:14:46 +02:00
Laurenz 551e3af9d0 Replace using with from 2021-07-08 21:16:16 +02:00
Laurenz 4dbd9285c9 Basic enums 2021-06-11 14:00:06 +02:00
Laurenz 5afb42ad89 Lists with indent-based parsing
- Unordered lists with indent-based parsing and basic layout using stacks
- Headings are now also indent based
- Removes syntax functions since they will be superseded by select & transform
2021-06-09 00:37:13 +02:00
Martin Haug 9f77f09aac Parse import and include expressions
Co-Authored-By: Laurenz <laurmaedje@gmail.com>
2021-05-31 22:33:40 +02:00
Laurenz a175d37ff2 Refactor parser a bit 2021-05-21 23:58:34 +02:00
Laurenz 84cdc85ca7 Refresh parser 🌊 2021-02-18 15:06:00 +01:00
Laurenz 146eda102a Move span directly into diagnostics 🚚 2021-02-11 19:26:47 +01:00
Laurenz 06ca740d01 Split evaluation and execution 🔪 2021-02-09 19:46:57 +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 6fcef9973b Refresh tests 🔄 2021-01-31 22:43: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 e847082435 Multi-expression blocks 🛍️ 2021-01-26 21:13:52 +01:00
Laurenz 84ba547c7c If expressions 🔀 2021-01-20 21:33:13 +01:00
Laurenz 29be90bf95 Assertions with [eq] + better tests 🩺 2021-01-17 13:53:22 +01:00
Laurenz 539735e668 Basic let bindings 🎞 2021-01-13 11:54:50 +01:00
Laurenz 3c7d249ae4 Rename token modes ✏ 2021-01-10 20:48:32 +01:00
Laurenz 8275b186ba Remove star-slash token 2021-01-07 16:13:18 +01:00
Laurenz 8cad78481c A few small improvements ♻ 2021-01-01 17:54:31 +01:00
Laurenz 2b6ccd8248 Better parser testing 2021-01-01 16:43:58 +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 ba3d43f7b2 Refresh function call and dictionary syntax
- No colon between function name and arguments, just whitespace
- "Named" arguments (previously "keyword" arguments) use colon instead of equals sign
2020-12-27 20:45:20 +01:00
Laurenz 2336aeb4c3 Tweak parser error messages 🔮 2020-12-16 16:24:06 +01:00
Laurenz 1a70cb6a33 Naming and grammar ✔ 2020-10-12 18:01:22 +02:00