Move operator precedence calculation into Node.