138 Commits

Author SHA1 Message Date
Eduardo Sánchez Muñoz
38213ed534
Use u64 instead of usize to store counter and enumeration item numbers, so behavior does not vary from 64-bit to 32-bit platforms (#6026) 2025-03-24 18:16:33 +00:00
Ian Wrzesinski
cfb3b1a270
Improve clarity of ast.rs for newcomers to the codebase (#5784)
Co-authored-by: PgBiel <9021226+PgBiel@users.noreply.github.com>
Co-authored-by: T0mstone <39707032+T0mstone@users.noreply.github.com>
2025-02-26 20:10:36 +00:00
Laurenz
69c3f95705
Bump MSRV to 1.83 and Rust in CI to 1.85 (#5946) 2025-02-24 12:28:01 +00:00
Max
55bc5f4c94
Make math shorthands noncontinuable (#5925) 2025-02-23 11:28:24 +00:00
Malo
f239b0a6a1
Change the default math class of U+22A5 ⊥ UP TACK to Normal (#5714) 2025-01-31 10:05:03 +00:00
Laurenz
1b2719c94c
Resolve bound name of bare import statically (#5773) 2025-01-29 14:20:30 +00:00
Ian Wrzesinski
0b8b7d0f23 Just add MathText SyntaxKind 2025-01-23 16:28:29 -05:00
T0mstone
b7546bace7
Ignore shebang at start of file (#5702) 2025-01-23 13:05:12 +00:00
wznmickey
ce299d5832
Support syntactically directly nested list, enum, and term list (#5728)
Co-authored-by: Laurenz <laurmaedje@gmail.com>
2025-01-23 12:52:20 +00:00
Ian Wrzesinski
f7bd03dd76
Fix delimiter unparen syntax (#5739) 2025-01-23 12:27:38 +00:00
Ian Wrzesinski
63c4720ed2
Fix list indent when starting at an open bracket (#5677) 2025-01-16 13:40:29 +00:00
Max
be6629c7cb
Better math argument parsing (#5008) 2025-01-09 10:49:06 +00:00
Ian Wrzesinski
370aa5929f
Remove unused single quote shorthand (#5609) 2024-12-20 10:00:09 +00:00
Laurenz
1346385255
Rename pattern to tiling (#5590) 2024-12-17 09:25:27 +00:00
Ian Wrzesinski
ef4fc040b2
Improve raw trimming (#5541) 2024-12-11 11:31:04 +00:00
wznmickey
bb0c814095
Forbid base prefix for numbers with a unit (#5548)
Co-authored-by: Laurenz <laurmaedje@gmail.com>
2024-12-09 10:56:42 +00:00
Ian Wrzesinski
50dcacea9a
Convert unopened square-brackets into a hard error (#5414) 2024-12-08 16:23:14 +00:00
Laurenz
0228462ba1
Bump Rust to 1.83 (#5534) 2024-12-05 15:57:01 +00:00
Laurenz
525154a730 Add support for raw range spans 2024-11-13 10:21:40 +01:00
Laurenz
cb1aad3a0c
Refactor Parser (#5310) 2024-11-04 10:17:49 +01:00
Ian Wrzesinski
2c9728f53b 18. Restore list indent behavior 2024-11-03 22:04:06 -05:00
Ian Wrzesinski
9d9a1b1e33 17. Replace while loop closures and Parser::end() to use SyntaxSet 2024-11-03 20:28:49 -05:00
Ian Wrzesinski
86ce443806 16. Compress with_mode and with_nl_mode to reduce rightward drift 2024-11-03 20:28:49 -05:00
Ian Wrzesinski
26c61be1dc 15. Convert Markup mode to use newline modes
(And break out Newline info into separate struct)
2024-11-03 20:28:49 -05:00
Ian Wrzesinski
a70b8a56ef
Disallow space between ident and paren in set rule (#5269) 2024-11-01 09:45:08 +00:00
Ian Wrzesinski
4ce0b069f6 14. Update 'maybe_wrap_in_math' to remove 'wrap_within' and 'post_process'! 2024-10-31 18:26:12 -04:00
Ian Wrzesinski
97229d24e4 13. Reorder functions to avoid jumping around when reading code. No actual changes. 2024-10-31 18:26:12 -04:00
Ian Wrzesinski
91b384ad7b 12. Add the Token type and replace lex/skip/save methods 2024-10-31 18:26:12 -04:00
Ian Wrzesinski
c466080fb2 11. Add Parser::finish_into 2024-10-31 18:26:12 -04:00
Ian Wrzesinski
2ae1e1627f 10. Change parser modes using closures instead of manual stacks 2024-10-31 18:26:12 -04:00
Ian Wrzesinski
88d86714a1 9. Parse math field access in the lexer 2024-10-31 18:26:12 -04:00
Ian Wrzesinski
09975d1133 8. Create Raw nodes entirely within the lexer 2024-10-31 18:26:12 -04:00
Ian Wrzesinski
1cecae0333 7. Return SyntaxNodes from the Lexer 2024-10-31 18:26:12 -04:00
Ian Wrzesinski
01186779cd 6. Reduce size of memoization map state 2024-10-31 18:26:12 -04:00
Ian Wrzesinski
16cc7eb472 5. Refactor parser memoization to localize functionality 2024-10-31 18:26:12 -04:00
Ian Wrzesinski
54eadb65a9 4. Rename convert to convert_and_eat 2024-10-31 18:26:12 -04:00
Ian Wrzesinski
a764aa4192 3. Add typst-syntax README and parser comments 2024-10-31 18:26:12 -04:00
Abdul-Rahman Sibahi
b969c01b28
Replace once_cell's Lazy as much as possible (#4617)
Co-authored-by: Laurenz <laurmaedje@gmail.com>
2024-10-31 11:52:11 +00:00
Laurenz
be7cfc85d0
Split out four new crates (#5302) 2024-10-27 18:04:55 +00:00
Ian Wrzesinski
b8034a3438
Syntax set macro (#5138)
Co-authored-by: Laurenz <laurmaedje@gmail.com>
2024-10-22 13:25:52 +00:00
Laurenz
6257e4d6cf
More robust glyph drawing (#5159) 2024-10-10 11:59:00 +00:00
Armin Brauns
deb0308980
Fix "thumbnail" key in manifest files not being optional (#5122) 2024-10-07 08:22:59 +00:00
Josh Soref
ca1f749c08
Spelling (#5020)
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
2024-09-26 17:32:55 +00:00
Bruce Mitchener
f283995c3d
Reduce typo count. (#4923) 2024-09-22 12:14:56 +00:00
Sébastien d'Herbais de Thun
1997db00f3
Parenthesized imports (#4869)
Co-authored-by: Laurenz <laurmaedje@gmail.com>
2024-09-02 13:27:33 +00:00
PgBiel
238f1fad49
Fix docstring in package manifest code (#4801) 2024-08-22 10:38:54 +00:00
Max
cefca7a7d8
Fix typos (#4784) 2024-08-20 15:12:12 +00:00
Yip Coekjan
ccd4524106
Fix lexer on sth followed by comments (#4739) 2024-08-15 19:53:15 +00:00
Max
b07607d35e
Split shorthands into math and markup, add tilde shorthand (#4706) 2024-08-09 07:41:01 +00:00
+merlan #flirora
a88899ed75
Bail out of reparse in expr_with_paren if we land on a different char (#4577) 2024-08-08 16:06:22 +00:00