Tom Alexander
4897952330
Make creating AllAstNodeIter explicit.
...
clippy Build clippy has succeeded
rust-foreign-document-test Build rust-foreign-document-test has succeeded
rust-build Build rust-build has succeeded
rust-test Build rust-test has succeeded
This is to remove the ambiguity between calling iter on the specific structs like Document and calling iter on an AstNode by having an explicitly-named function to create the iterator.
2023-10-23 18:25:59 -04:00
Tom Alexander
c578bb45af
Implement ExactSizeIterator for the other node types.
2023-10-10 15:27:03 -04:00
Tom Alexander
b7f7876706
Impl ExactSizeIterator for multi_field_iter.
2023-10-10 15:23:04 -04:00
Tom Alexander
ee5ed17c20
Implement ExactSizeIterator for DocumentIter.
2023-10-10 15:19:42 -04:00
Tom Alexander
2352636672
Split GreaterBlock into CenterBlock, QuoteBlock, and SpecialBlock.
...
Center and quote blocks do not have parameters nor do they store their name so I am separating them out.
2023-10-02 22:33:00 -04:00
Tom Alexander
a62c3fc522
Move AstNode into the types crate.
...
Now that it is used for more than just iteration, it makes sense to promote it to the types crate.
2023-10-02 13:10:45 -04:00
Tom Alexander
418c5c1ce8
Implement the traits for all ast node types.
2023-10-02 12:53:23 -04:00
Tom Alexander
ecd523fa8f
Fix lifetimes in the compare functions.
2023-10-02 12:36:09 -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