refactor($parse): merge ternary and ternaryFn methods

splitting the code into two chunks doesn't buy us anything and only makes the code harder to follow