Commit Graph

1343 Commits

Author SHA1 Message Date
Tom Alexander 178894680b
Compare footnote section. 2023-10-02 10:48:34 -04:00
Tom Alexander 599b3b8f0a
Apply category even if there are radio targets.
rustfmt Build rustfmt has failed Details
rust-build Build rust-build has failed Details
rust-test Build rust-test has succeeded Details
rust-foreign-document-test Build rust-foreign-document-test has succeeded Details
2023-10-02 10:26:57 -04:00
Tom Alexander d78ce10a0b
Compare raw-value. 2023-10-02 10:26:57 -04:00
Tom Alexander 12ab9beada
Merge branch 'document_properties'
rustfmt Build rustfmt has succeeded Details
rust-build Build rust-build has succeeded Details
rust-test Build rust-test has succeeded Details
rust-foreign-document-test Build rust-foreign-document-test has failed Details
2023-09-30 16:06:05 -04:00
Tom Alexander 186201a4b5
Remove category from global settings.
rust-build Build rust-build has succeeded Details
rust-test Build rust-test has succeeded Details
rust-foreign-document-test Build rust-foreign-document-test has failed Details
This setting does not impact parsing so we can iterate over the final document to find the keywords.
2023-09-30 14:35:22 -04:00
Tom Alexander d38b0a84f6
Fix handling file names with periods before the file extension.
rust-build Build rust-build has succeeded Details
rust-test Build rust-test has failed Details
rust-foreign-document-test Build rust-foreign-document-test has failed Details
2023-09-30 01:26:24 -04:00
Tom Alexander 6ed35f4674
Minor cleanup. 2023-09-30 00:16:19 -04:00
Tom Alexander 846a8b3729
Support reading category from in-buffer-settings. 2023-09-30 00:14:26 -04:00
Tom Alexander 896250836b
Add support for parsing quoted strings containing escaped octals. 2023-09-29 23:59:33 -04:00
Tom Alexander 6c77586960
Improve error message. 2023-09-29 23:59:32 -04:00
Tom Alexander fc7d4bd949
Set Document path and category based on file path. 2023-09-29 23:59:32 -04:00
Tom Alexander f1e35e317b
Compare document path. 2023-09-29 21:20:23 -04:00
Tom Alexander 3fb2b5d31c
Undo the getters change.
The getters were a good idea, but if we are going to support editing later, we will need to expose the fields or write A LOT of boiler-plate. The getters also would prevent people from moving values out of the AST without even more boiler-plate. It is simply not worth it at this stage, so we will need to tolerate frequently changing semver versions as the public interface changes since *every* field in the AST is public.
2023-09-29 21:14:55 -04:00
Tom Alexander d1dac0b8de
Compare document category. 2023-09-29 20:57:09 -04:00
Tom Alexander 93f1bcd744
Add getters for Document. 2023-09-29 20:57:09 -04:00
Tom Alexander 47674a6907
Merge branch 'initial_getters'
rustfmt Build rustfmt has succeeded Details
rust-build Build rust-build has succeeded Details
rust-test Build rust-test has succeeded Details
rust-foreign-document-test Build rust-foreign-document-test has succeeded Details
2023-09-29 20:40:45 -04:00
Tom Alexander 5d1582be4d
Remove multi_field_getter_iter.
This was written because I originally intended to make the fields of the ast node types entirely private, but that made constructing them tedious so they are pub(crate) which coincidentally also allows them to be used by the iterator.
2023-09-29 20:40:31 -04:00
Tom Alexander dae10c2eef
Initial work for exposing getters and hiding the fields of the ast nodes.
Ultimately this is about semver and exposing a stable interface while allowing the internal representation to change. The fields are still pub(crate) to make constructing the types easier inside this crate, which should be fine because we can refactor the code inside this crate whenever the internal structure changes.
2023-09-29 20:40:31 -04:00
Tom Alexander 5e127fec11
Merge branch 'plain_list_item_properties'
rustfmt Build rustfmt has succeeded Details
rust-build Build rust-build has succeeded Details
rust-test Build rust-test has succeeded Details
rust-foreign-document-test Build rust-foreign-document-test has succeeded Details
2023-09-29 19:30:32 -04:00
Tom Alexander 064a4eeee7
Compare plain list item pre blank. 2023-09-29 19:30:02 -04:00
Tom Alexander 7727b5ef47
Compare plain list item counter. 2023-09-29 18:45:38 -04:00
Tom Alexander 967e74c147
Compare plain list item bullets. 2023-09-29 17:28:50 -04:00
Tom Alexander 13697df7ea
Merge branch 'test_combinations'
rustfmt Build rustfmt has succeeded Details
rust-build Build rust-build has succeeded Details
rust-test Build rust-test has succeeded Details
rust-foreign-document-test Build rust-foreign-document-test has succeeded Details
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'
rustfmt Build rustfmt has succeeded Details
rust-test Build rust-test has succeeded Details
rust-build Build rust-build has succeeded Details
rust-foreign-document-test Build rust-foreign-document-test has succeeded Details
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.
rustfmt Build rustfmt has succeeded Details
rust-test Build rust-test has succeeded Details
rust-build Build rust-build has succeeded Details
rust-foreign-document-test Build rust-foreign-document-test has succeeded Details
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'
rustfmt Build rustfmt has succeeded Details
rust-test Build rust-test has succeeded Details
rust-build Build rust-build has succeeded Details
rust-foreign-document-test Build rust-foreign-document-test has succeeded Details
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