- /** create a new forest */
- public static <T> Forest<T> create(Input.Region loc, T head, Forest<T>[] children, boolean lift) {
- return new One<T>(loc, head, children, lift);
+ static <NodeType> Forest<NodeType> create(Input.Region loc, NodeType head, Forest<NodeType>[] children, boolean lift) {
+ if (loc == null) throw new Error();
+ return new One<NodeType>(loc, head, children, lift);