valence
valence copied to clipboard
NBT path structure
Description
this adds functionality for parsing NBT paths
Describe the changes you've made. Link to any issues this PR fixes or addresses.
The changes I have made so far implement an NbtPath
structure and a parser from a String
to an NbtPath
.
(from this issue)
https://github.com/valence-rs/valence/issues/338
this is not fully complete: i have a few questions i need a bit of clarification on:
- Should I still store spans in the enum variants of
NbtPathNode
? or is that just redundant because I'm already storing owned values (mainly because of escape characters in quoted strings) - What other types should be able to convert into
NbtPath
besidesString
? (like&str
?) - From the original issue: "Once the NbtPath is parsed, lookups can be performed on
&Compound
or&mut Compound
values." -- how should I go about implementing this? i'm having trouble visualizing the structure of a largeCompound
with many parts and how i'd traverse through it
soo yea that's all for now :p