LDQ: I'm trying to write code to tokenize expressions for a lang im making, is this method salvageable or is it too Bad:
0. take code as a string, naturally
1. split on highest level parentheses ( "Foo(Bar)Baz" => "Foo", ["Bar"], "Baz" or whatever)
2. tokenize the parenthesized groups (this is a recur point)
3. if there are no parentheses (left) in the string, split on operators in (reverse) priority order and save the operator name ( "A+B=C" => [equals "A+B" "C"] => [equals [add "A" "B"] "C"] (also recursive)