Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Design editing API #12

Open
matklad opened this issue Jul 14, 2018 · 0 comments
Open

Design editing API #12

matklad opened this issue Jul 14, 2018 · 0 comments
Labels
E-hard Might be tricky to fix needs design I have no idea how to fix it. Feedback is welcome!

Comments

@matklad
Copy link
Owner

matklad commented Jul 14, 2018

Currently, the editing API is just a whole bunch of functions here: https://github.com/matklad/tom/blob/5a1b98e0b0b13529a917a9c2212f6813a9eb1948/src/edit.rs

I am not sure that this is the best way to arrange this API. I think for creation API we might want to change doc.new_entry_from_text/doc.new_entry to ast::Entry::from_text(&mut doc)/ast::Entry::new(&mut doc). We might want to add builders for complex types like tables.

We certainly need mode AST-based editing APIs: EntryOwner::add_entry(doc, entry, position), EntryOwner::remove_entry ....

@matklad matklad added E-hard Might be tricky to fix needs design I have no idea how to fix it. Feedback is welcome! labels Jul 14, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
E-hard Might be tricky to fix needs design I have no idea how to fix it. Feedback is welcome!
Projects
None yet
Development

No branches or pull requests

1 participant