summaryrefslogtreecommitdiff
path: root/src/syntax/parsing.rs
AgeCommit message (Collapse)Author
2023-01-15Remove most fields from `SyntaxKind` enumLaurenz
2023-01-14Reorganize syntax moduleLaurenz
2023-01-03New import syntaxLaurenz
2022-12-31Merge `MarkupNode` and `MathNode` into `Expr`Laurenz
2022-12-22Rename `desc` to `terms`Laurenz
2022-12-09Align set ruleLaurenz
2022-12-06Math shorthandsLaurenz
2022-12-06More math syntaxLaurenz
2022-12-05Symbol notationLaurenz
2022-11-26Dynamic labelsLaurenz
2022-11-22Rename two syntax typesLaurenz
2022-11-07Show it!Laurenz
- New show rule syntax - Set if syntax - Removed wrap syntax
2022-11-04Style changesLaurenz
2022-10-17Merge some modulesLaurenz
2020-09-03Split up parser into multiple files ๐ŸงฑLaurenz
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-02Rename `skip_white` to `skip_ws` โœ’Laurenz
2020-09-01Deduplicate and flexibilize code token & node building ๐ŸงบLaurenz
2020-09-01Formatting ๐ŸŒฟLaurenz
2020-09-01Add section headings ๐Ÿ‘จโ€๐ŸฆฒMartin Haug
Co-authored-by: Laurenz Mรคdje <laurmaedje@gmail.com>
2020-08-31Move Nbsp logic to tokenizer ๐Ÿš›Martin Haug
2020-08-31Capability to escape the tilde symbol ๐Ÿ’จMartin Haug
2020-08-31Add non-breaking space ๐Ÿ”’Martin Haug
2020-08-30Format everything with rustfmt! ๐Ÿ’šLaurenz
2020-08-30Some alignment โญLaurenz
2020-08-30Make some code easier for rustfmt ๐ŸฆLaurenz
2020-08-30Slight simplifications ๐ŸƒLaurenz
2020-08-30Also provide escapes for strings ๐Ÿ—’Martin Haug
2020-08-30Added Unicode Escaping for body text ๐Ÿ‘™Martin Haug
2020-08-29Newlines are complicated, y'all ๐Ÿ˜ฑMartin Haug
Co-authored-by: laurmaedje@outlook.de <laurmaedje@outlook.de>
2020-08-29Fixing the build by removing P macro usage ๐Ÿš‘Martin Haug
Kids, merge with caution!
2020-08-29Merge branch 'master' into code-blocksMartin
2020-08-29Added code blocks ๐ŸšŸMartin Haug
2020-08-29Remove par nodes in favor of parbreaks ๐Ÿ”„Laurenz
This basically reverts the earlier change from parbreaks to par nodes because: - It is simpler and less nested - It works way better with functions that layout their body inline like `font`, which where buggy before, previously The original reasons for changing to par nodes were: - the envisioned design of the layouter at that time (based on dynamic nodes etc.), which is not relevant anymore - possibly existing benefits with regards to incremental compilation, which are unsure and outweighed by the immediate benefits of the parbreak-representation
2020-08-27Do as Dolores says โšกLaurenz
2020-08-27Better error reporting for nameless function ๐Ÿ’กLaurenz
2020-08-27Fixing the regression ๐ŸฉนMartin Haug
2020-08-27Code review-tastic changes ๐ŸฆชMartin Haug
2020-08-27Add Multi-Invokation ๐Ÿ‘จโ€๐Ÿ‘ฉโ€๐Ÿ‘งโ€๐Ÿ‘งMartin Haug
2020-08-19Remove some obsolete stuff โŒLaurenz
2020-08-17Parse braced expressions and bracketed calls in headers ๐Ÿ—ณLaurenz
- Refactors the tokenizer to be lazy: It does not emit pre-parsed function tokens, but instead allows it's mode to be changed. The modes are tracked on a stack to allow nested compute/typesetting (pop/push). - Introduces delimited groups into the parser, which make it easy to parse delimited expressions without handling the delimiters in the parsing code for the group's content. A group is started with `start_group`. When reaching the group's end (matching delimiter) the eat and peek methods will simply return `None` instead of the delimiter, stopping the content parser and bubbling up the call stack until `end_group` is called to clear up the situation.
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-14Desugar body into last argument ๐ŸฉLaurenz
2020-08-14Always parse bodies as syntax trees ๐ŸŒณLaurenz
Previously they were passed as strings to the function parser, now they are parsed and then passed as trees to the function. This allows making bodies sugar for a last content argument. While it removes some flexibility allowing function to parse arbitrary syntaxes in their bodies, these can be modelled as (raw) string arguments.
2020-08-13Use equals sign instead of colon for objects ๐Ÿ“Laurenz
2020-08-13Remove redundant `Expr` prefix from tokens ๐ŸงฝLaurenz
2020-08-04Refactor function parsing โ™ปLaurenz
2020-08-04Par nodes ๐ŸงณLaurenz
2020-08-03Formatting, documentation and small improvements ๐ŸงฝLaurenz
2020-08-02Replace body! macro with functions ๐ŸงฐLaurenz