1 package org.simantics.scl.compiler.internal.types.ast;
3 import org.simantics.scl.compiler.internal.types.TypeElaborationContext;
4 import org.simantics.scl.compiler.types.Type;
5 import org.simantics.scl.compiler.types.Types;
6 import org.simantics.scl.compiler.types.exceptions.SCLTypeParseException;
9 public class TApplyAst extends TypeAst {
10 public final TypeAst function;
11 public final TypeAst parameter;
13 public TApplyAst(TypeAst function, TypeAst parameter) {
14 this.function = function;
15 this.parameter = parameter;
19 public void toString(StringBuilder b) {
20 function.toString(b, 2);
22 parameter.toString(b, 1);
26 public Type toType(TypeElaborationContext context) throws SCLTypeParseException {
27 return Types.apply(function.toType(context), parameter.toType(context));
31 public int getPrecedence() {