chappertron / lammps-analyser

A linter for the LAMMPS scripting language
GNU General Public License v2.0
0 stars 0 forks source link

feat: refactor so nodes are always valid utf-8 #16

Closed chappertron closed 1 month ago

chappertron commented 1 month ago

This removes the need for the FromNodeError::Utf8Error variant, by always passing in a string slice instead of a impl AsRef<[u8]> into many methods

This is greatly assisted by adding an extension method str_text to tree_sitter::Node which is a simple wrapper around the utf8_text method but always takes in valid utf-8