Refactor: Logic Rewrite #35
No reviewers
Labels
No labels
bug
dependencies
documentation
duplicate
enhancement
github_actions
good first issue
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: nwesterhausen/dfraw_parser#35
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "dev"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Rewrite of parsing logic.
This was to simplify the parsing from a massive match statement to having each type of raw handle parsing itself. Additionally, instead of a match with strings, this uses a perfect hash table for the strings of the tokens. That gets turned into an
enumvalue which is then matched. It isn't clear if this actually is faster, but it is much much simpler to maintain.Another change was removing the "conversion" stuff that was handwritten (because I wasn't sure how to use
serde_jsonwithout caring about the underlying type.. i.e. withBox<dyn trait>situations. However with thetypetaglibrary,serde_jsonactually does all the work and with the generated bindings its very simple to work with the JSON output.To keep the serialized file size down, any default values are skipped during the serialization step. This makes a huge difference, cutting the size down an order of magnitude. This lets some raws be super specific while others can be fairly plain.
Resolves #4 by letting the program handle COPY_TAGS_FROM tags.
Resolves #20 by letting the lib functions return
Vec<Box<dyn RawObject>>List of features:
rs-tsserdehandles all serialization