Commit Graph

1722 Commits

Author SHA1 Message Date
Tom Alexander
967e74c147
Compare plain list item bullets. 2023-09-29 17:28:50 -04:00
Tom Alexander
13697df7ea
Merge branch 'test_combinations'
All checks were successful
rustfmt Build rustfmt has succeeded
rust-build Build rust-build has succeeded
rust-test Build rust-test has succeeded
rust-foreign-document-test Build rust-foreign-document-test has succeeded
2023-09-29 16:39:02 -04:00
Tom Alexander
07e11e359a
Add tests for odd headline levels. 2023-09-29 16:37:22 -04:00
Tom Alexander
0c363c8dd6
Add tests for tab width. 2023-09-29 16:03:55 -04:00
Tom Alexander
9a479b33e0
Make the same changes we did for stdin compare to comparing files. 2023-09-29 15:42:07 -04:00
Tom Alexander
7a854838ef
Clean up code duplication. 2023-09-29 15:35:57 -04:00
Tom Alexander
2012e5a6d5
Test org_mode_samples both with and without alphabetical lists enabled. 2023-09-29 15:30:38 -04:00
Tom Alexander
f1261ddce8
Remove "org_" prefix from list_allow_alphabetical.
These settings are exclusively for parsing org-mode so the prefix is redundant.
2023-09-29 14:33:52 -04:00
Tom Alexander
3a422e6435
Counter set always allows alphabetic values regardless of org-list-allow-alphabetical. 2023-09-29 14:32:41 -04:00
Tom Alexander
6670f8c768
Add tests for alphabetic counter sets. 2023-09-29 14:26:39 -04:00
Tom Alexander
d7a36c8aca
Merge branch 'plain_list_properties'
All checks were successful
rustfmt Build rustfmt has succeeded
rust-test Build rust-test has succeeded
rust-build Build rust-build has succeeded
rust-foreign-document-test Build rust-foreign-document-test has succeeded
2023-09-29 13:05:03 -04:00
Tom Alexander
f820e27b17
Compare plain list type in diff.rs. 2023-09-29 13:03:25 -04:00
Tom Alexander
a4b1d462c3
Parse out the plain list type. 2023-09-29 12:49:10 -04:00
Tom Alexander
1b7326eafe
Use static strings for CustomError.
All checks were successful
rustfmt Build rustfmt has succeeded
rust-test Build rust-test has succeeded
rust-build Build rust-build has succeeded
rust-foreign-document-test Build rust-foreign-document-test has succeeded
This resulted in a 20% speedup.
2023-09-29 12:02:26 -04:00
Tom Alexander
90433aa55f
Update callgrind script to build with optimizations. 2023-09-29 12:02:25 -04:00
Tom Alexander
a5b4eb40f6
Merge branch 'reduce_heap_iter'
All checks were successful
rustfmt Build rustfmt has succeeded
rust-test Build rust-test has succeeded
rust-build Build rust-build has succeeded
rust-foreign-document-test Build rust-foreign-document-test has succeeded
2023-09-27 19:48:07 -04:00
Tom Alexander
48d550e1fc
Remove old implementation of iteration. 2023-09-27 19:45:40 -04:00
Tom Alexander
9ce042d5b6
Replace old iteration with new iteration. 2023-09-27 19:44:06 -04:00
Tom Alexander
8784da5179
Implement all ast node iteration. 2023-09-27 19:30:21 -04:00
Tom Alexander
875a50ae46
Finish implementing AstNodeIter for all types. 2023-09-27 19:02:33 -04:00
Tom Alexander
c4ea3fbf88
Implement the rest of the elements. 2023-09-27 18:55:50 -04:00
Tom Alexander
95fa834420
Switch to using the multi field macro for document and heading. 2023-09-27 18:38:51 -04:00
Tom Alexander
32a7ce3f36
Implement a macro for iterators with multiple fields. 2023-09-27 18:36:29 -04:00
Tom Alexander
d8c52568db
Add PlainListItem to ast nodes. 2023-09-27 18:21:42 -04:00
Tom Alexander
c5be75ee8d
Implement DocumentIter and SectionIter. 2023-09-27 18:05:53 -04:00
Tom Alexander
282417ee94
Implementing HeadingIter but I do not think it can be generic enough for a macro.
Hopefully most types won't need so much care.
2023-09-27 18:00:30 -04:00
Tom Alexander
ab46a9e5c6
Ran into issue with heading, naming this type is going to be a nightmare. 2023-09-27 15:56:45 -04:00
Tom Alexander
4359fc9266
Introduce a macro for empty iterators. 2023-09-27 15:47:01 -04:00
Tom Alexander
7419b75d76
Implement empty iterator for types with no ast node children. 2023-09-27 15:38:33 -04:00
Tom Alexander
e4cfc296e5
Introduce macro to simplify this. 2023-09-27 15:28:43 -04:00
Tom Alexander
9a1d91ae45
Manual implementation of BoldIter. 2023-09-27 15:17:56 -04:00
Tom Alexander
df5d699a39
Implement Into for AstNode. 2023-09-27 15:07:26 -04:00
Tom Alexander
9111408d83
Introduce AstNode and AstNodeIter enums. 2023-09-27 14:24:08 -04:00
Tom Alexander
35f058a354
Starting a new iteration implementation.
This implementation will reduce the use of heap by elimininating Box<> from the individual iterators but it will still need heap for maintaining a vector of iterators from nodes.
2023-09-27 13:48:17 -04:00
Tom Alexander
dd91e506bd
Merge branch 'scan_optimization'
All checks were successful
rustfmt Build rustfmt has succeeded
rust-test Build rust-test has succeeded
rust-build Build rust-build has succeeded
rust-foreign-document-test Build rust-foreign-document-test has succeeded
2023-09-24 03:11:46 -04:00
Tom Alexander
cd781a7dcf
Add simple test to prove the scan for in-buffer settings is still working. 2023-09-24 03:09:51 -04:00
Tom Alexander
8cd0e4ec63
Optimize scanning for in-buffer settings by scanning forward for possible keywords.
Previously we stepped through the document character by character which involved a lot of extra processing inside OrgSource. By scanning for possible keywords, we can skip many of the intermediate steps.
2023-09-24 02:58:32 -04:00
Tom Alexander
f9460b88d7
Add a TODO for a performance optimization. 2023-09-24 01:59:26 -04:00
Tom Alexander
0b2a5f4fbf
Change all runtime asserts in private functions to debug_assert.
All checks were successful
rustfmt Build rustfmt has succeeded
rust-test Build rust-test has succeeded
rust-build Build rust-build has succeeded
rust-foreign-document-test Build rust-foreign-document-test has succeeded
These functions aren't exposed to the public so we can confidently say that if they work in dev then they will work in production. Removing these asserts theoretically should result in a speedup.
2023-09-23 21:17:58 -04:00
Tom Alexander
6097e4df18
Merge branch 'standard_properties'
All checks were successful
rustfmt Build rustfmt has succeeded
rust-test Build rust-test has succeeded
rust-build Build rust-build has succeeded
rust-foreign-document-test Build rust-foreign-document-test has succeeded
2023-09-23 21:12:40 -04:00
Tom Alexander
d5b1014fe4
Unify the standard properties checks in diff.
Instead of copy+pasting them into each compare function, we now call a shared function from a handful of places.
2023-09-23 21:05:56 -04:00
Tom Alexander
dd8a8207ce
Move assert bounds for elements and objects (except PlainText) to the compare element/object functions. 2023-09-23 19:35:12 -04:00
Tom Alexander
b4c985071c
Add a GetStandardProperties trait. 2023-09-23 19:13:01 -04:00
Tom Alexander
d4f27ef297
Remove only use of Source trait. 2023-09-23 17:59:13 -04:00
Tom Alexander
f25246556c
Rename the existing StandardProperties struct to EmacsStandardProperties. 2023-09-23 17:44:54 -04:00
Tom Alexander
3fe56e9aa3
Implement StandardProperties for all the AST nodes and restrict the Source trait to this crate.
Currently this is a copy of the Source trait but it will grow to more functions. The Source trait is restricted to this crate in anticipation of its removal in favor of StandardProperties.
2023-09-23 17:42:27 -04:00
Tom Alexander
f180412ff3
Introduce a StandardProperties trait. 2023-09-23 17:33:46 -04:00
Tom Alexander
f0e28206ff
Add a supported versions section to the README.
All checks were successful
rustfmt Build rustfmt has succeeded
rust-test Build rust-test has succeeded
rust-build Build rust-build has succeeded
rust-foreign-document-test Build rust-foreign-document-test has succeeded
2023-09-23 14:54:56 -04:00
Tom Alexander
1f64e289a2
Add TODOs for all of the properties that need to be compared.
Some checks failed
rust-foreign-document-test Build rust-foreign-document-test has started
rustfmt Build rustfmt has failed
rust-build Build rust-build has failed
rust-test Build rust-test has failed
2023-09-23 14:46:36 -04:00
Tom Alexander
f7690ff64b
Remove an allocation for lesser block end. 2023-09-22 00:55:10 -04:00