summaryrefslogtreecommitdiff
path: root/src/syntax/expr.rs
AgeCommit message (Collapse)Author
2021-01-15Move value tests + smarter number formatting ๐Ÿ”ขLaurenz
2021-01-13Basic let bindings ๐ŸŽžLaurenz
2021-01-12Group and block expressions, unary plus ๐ŸงฉLaurenz
2021-01-10Braced content -> Bracketed templates โœLaurenz
2021-01-10Rename token modes โœLaurenz
2021-01-10Add angle value ๐Ÿ“Laurenz
2021-01-09Add angle data type ๐Ÿ“Laurenz
2021-01-06Inline literal enum into expression enum ๐Ÿ”€Laurenz
2021-01-06Pretty printing ๐Ÿฆ‹Laurenz
- Syntax tree and value pretty printing - Better value evaluation (top-level strings and content are evaluated plainly, everything else is pretty printed)
2021-01-04None literal ๐Ÿ•ณLaurenz
2021-01-03Move and rename many things ๐Ÿš›Laurenz
2021-01-02Dynamic values, Types, Arrays, and Dictionaries ๐Ÿš€Laurenz
- 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
2020-12-31Parsing improvements ๐ŸงฝLaurenz
- 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-27Refresh function call and dictionary syntaxLaurenz
- No colon between function name and arguments, just whitespace - "Named" arguments (previously "keyword" arguments) use colon instead of equals sign
2020-10-10Flatten ast module back into syntax module ๐ŸŒชLaurenz
2020-10-02Refactor parser ๐ŸžLaurenz
2020-10-01Rename compute to eval โœLaurenz
2020-10-01Flatten compute moduleLaurenz
2020-10-01Reorganize ast types ๐Ÿ•Laurenz
2020-08-16Add Value type and replace dyn-nodes with call-exprs ๐Ÿ—Laurenz
- 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-16Remove tuples and objects in favor of tables ๐Ÿ›ขLaurenz
This refactores the parser tests to make them more concise and flexible with regards to spans.
2020-08-15Add table expressions with arg-parsing functions ๐Ÿช”Laurenz
2020-08-15Take references in TryFromExpr ๐Ÿ”ญLaurenz
2020-08-15Rename Value trait into TryFromExpr โœ’Laurenz
2020-08-14Add a syntax tree expression kind ๐ŸŽLaurenz
This allows bodies to be passed as regular arguments.
2020-08-13Use equals sign instead of colon for objects ๐Ÿ“Laurenz
2020-08-03Formatting, documentation and small improvements ๐ŸงฝLaurenz
2020-08-02Refactor model into tree ๐Ÿ›’Laurenz
2020-08-02Refactor argument parsing ๐Ÿ”ฌLaurenz
2020-08-02Unify font and page functions ๐Ÿ’•Laurenz
- Removes font weight and width warnings for now, will be added again later - Adds a bit hacky get_first function for tuples, will be refactored soon anyway
2020-07-29Move, rename and switch some things (boring) ๐ŸššLaurenz
- Problems -> Diagnostics - Position -> Pos - offset_spans -> Offset trait - Size -> Length (and some more size types renamed) - Paper into its own module - scope::Parser -> parsing::CallParser - Create `Decorations` alias - Remove lots of double newlines - Switch from f32 to f64
2020-07-26Streamline parser and tokenizer test code โœˆLaurenz
2020-07-26Rename errors to problems and make error! macro more ergonomic ๐ŸงผLaurenz
Also adds a `warning!` macro.
2020-07-18Spanned object pairs and refactoring ๐ŸงตMartin Haug
2020-07-18Parsing mathematical expressions :heavy_plus_sign:Martin Haug
2020-07-16Derive copy for RgbaColor and change debug representation ๐ŸžLaurenz
2020-07-15Use FromStr trait and formatting โœจLaurenz
2020-07-15Healed field for RgbaColors, CodeRev feedback ๐ŸคMartin Haug
2020-07-14Add named tuples and hex color tokensMartin Haug
2020-02-11Parse tuples and objects ๐Ÿ’Laurenz
Generalizes the parsing of tuples, objects and function arguments into generic comma-separated collections.
2020-02-04Streamline Key + Value traits ๐ŸŒŠLaurenz
2020-02-03Better Debug/Display and Derives ๐ŸงฝLaurenz
2020-01-26Document everything ๐Ÿ“œLaurenz
2020-01-24Reorganize modules ๐ŸงฑLaurenz
2020-01-24Non-fatal argument parsing ๐ŸŒ‹Laurenz
2020-01-21Decoupled function parser ๐Ÿ”— [WIP]Laurenz
2020-01-19Move to non-fatal errors ๐Ÿช‚ [WIP]Laurenz
- Dynamic models instead of SyntaxTrees - No more ParseResult/LayoutResult - Errors and Decorations which are propagated to parent contexts - Models are finally clonable
2020-01-16Powerful parser testing ๐Ÿฑโ€๐Ÿ‘คLaurenz
2020-01-14Parser testing prototype ๐ŸฅฅLaurenz
2020-01-13Refactor expressions and create tuples and objects ๐ŸงฎLaurenz