commands.rs
commands.rs copied to clipboard
A command system for Rust.
`longest_common_prefix` finds the byte index of the longest common byte prefix: https://docs.rs/commands/0.0.5/src/commands/util.rs.html#23-39 But slicing a string at a byte index that's not a char index (i.e. is in the middle...
We should have a way to create tokens from `argv` for handling feeding the `Parser` from the command line.
Should we use an actual Trie in the parser to store the nodes and move some of the data from the actual node out to the node within the trie?...
I'm not sure if it is possible to remove our usage of `Rc` or not. But I'd like to try again now that I understand things better.
While `SourceLocation` and `SourceOffset` are ready, the actual tokenizing code doesn't manage `line` and `col` values yet.