If the context of a line of code the + and - symbols can denote two different situations.
- A binary operation (ie. requires TWO arguments) X = 3 - 2
- A Unary operation (ie. applies only to the next argument) X = -3
What I am trying to insure is that I have all the situations that indicate a UNARY scenario.
This is what I have, and I *THINK* it covers everything... but I'm not 100% sure
Note : all these assume that whitespace is ignored
- If the symbol preceding the +/- is a (
- the +/- is 1st symbol on a line
- the +/- is preceded by an operator (* / + -) or equal sign (=)
- the +/- is preceded by a keyword but NOT a variable name