Change-Id: I7df83c111edb0267c59585cf0d5c544d0c985dbf
import java.util.List;
import org.simantics.scl.compiler.common.exceptions.InternalCompilerError;
import java.util.List;
import org.simantics.scl.compiler.common.exceptions.InternalCompilerError;
+import org.simantics.scl.compiler.environment.Environments;
import org.simantics.scl.compiler.errors.Locations;
import org.simantics.scl.compiler.internal.parsing.exceptions.SCLSyntaxErrorException;
import org.simantics.scl.compiler.internal.parsing.parser.SCLParserImpl;
import org.simantics.scl.compiler.errors.Locations;
import org.simantics.scl.compiler.internal.parsing.exceptions.SCLSyntaxErrorException;
import org.simantics.scl.compiler.internal.parsing.parser.SCLParserImpl;
+ /**
+ * Use {@link Environments#getType(org.simantics.scl.compiler.environment.Environment, String)} instead.
+ */
+ @Deprecated
public static Type parseType(ITypeEnvironment environment, String text) throws SCLTypeParseException {
return parseType(new TypeElaborationContext(environment), text);
}
public static Type parseType(ITypeEnvironment environment, String text) throws SCLTypeParseException {
return parseType(new TypeElaborationContext(environment), text);
}
+ /**
+ * This method uses DUMMY_TYPE_ENVIRONMENT that almost does anything useful. Use
+ * {@link Environments#getType(org.simantics.scl.compiler.environment.Environment, String)} instead.
+ */
+ @Deprecated
public static Type parseType(String text) throws SCLTypeParseException {
return parseType(new TypeElaborationContext(DUMMY_TYPE_ENVIRONMENT), text);
}
public static Type parseType(String text) throws SCLTypeParseException {
return parseType(new TypeElaborationContext(DUMMY_TYPE_ENVIRONMENT), text);
}
+
+ /**
+ * Use {@link Environments#getType(org.simantics.scl.compiler.environment.Environment, String)} instead.
+ */
+ @Deprecated
private static Type parseType(TypeElaborationContext context, String text) throws SCLTypeParseException {
SCLParserImpl parser = new SCLParserImpl(new StringReader(text));
try {
private static Type parseType(TypeElaborationContext context, String text) throws SCLTypeParseException {
SCLParserImpl parser = new SCLParserImpl(new StringReader(text));
try {