valence icon indicating copy to clipboard operation
valence copied to clipboard

NBT path structure

Open fdfdjfk3 opened this issue 1 year ago • 0 comments

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 besides String? (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 large Compound with many parts and how i'd traverse through it

soo yea that's all for now :p

fdfdjfk3 avatar Jun 12 '23 04:06 fdfdjfk3