Flatten `BinaryTree`s to avoid recursing into them

This avoids creating very deeply nested binary trees for constant string
literals (e.g. `a + b + c + d` parses as `(((a + b) + c) + d)`) which can
cause turbine to run out of stack evaluating constant expressions. This
replaces the accessors for the left and right children of a binary tree
with a method that flattens any nested binary trees with the same operator
kind, and returns the children as a list.

PiperOrigin-RevId: 393450281
6 files changed
tree: 97a60197749352839110448723a98d092a5dd5e7
  1. .github/
  2. java/
  3. javatests/
  4. proto/
  5. .gitattributes
  6. .gitignore
  7. LICENSE
  8. pom.xml
  9. README.md
README.md

Turbine

Turbine is a header compiler for Java.