@SuppressWarnings("deprecation") public TraceVariableStatement(TraceVariable var) { super(var.name.getLocation()); this.var = var; }
@Override public File getDefaultFile() { return defaultClass.getName().getLocation().getFile(); }
public static AIdentifierPattern newAIdentifierPattern(ILexNameToken token) { AIdentifierPattern result = new AIdentifierPattern(); initPattern(result, token.getLocation()); result.setLocation(token.getLocation()); result.setName(token); result.setConstrained(false); return result; }
public static AClassInvariantStm newAClassInvariantStm(ILexNameToken name, List<PDefinition> invdefs) { AClassInvariantStm result = new AClassInvariantStm(); initStatement(result, name.getLocation()); result.setName(name); result.setInvDefs(invdefs); name.getLocation().executable(false); return result; }
@Override public void caseILexNameToken(ILexNameToken node) throws AnalysisException { validateName(node.getName(), node.getLocation(), node.getModule()); }
public static AUnresolvedType newAUnresolvedType(ILexNameToken typename) { AUnresolvedType result = new AUnresolvedType(); initType(result, typename.getLocation()); result.setName(typename); return result; }
public static AParameterType newAParameterType(ILexNameToken name) { AParameterType result = new AParameterType(); initType(result, name.getLocation()); result.setName(name); return result; }
public static AClassInvariantDefinition newAClassInvariantDefinition( ILexNameToken name, PExp expression) { AClassInvariantDefinition result = new AClassInvariantDefinition(); // Definition initialization initDefinition(result, Pass.DEFS, name.getLocation(), name, NameScope.GLOBAL); result.setExpression(expression); return result; }
public static ATypeExport newATypeExport(ILexNameToken name, boolean struct) { ATypeExport result = new ATypeExport(); result.setLocation(name.getLocation()); result.setName(name); result.setStruct(struct); return result; }
private static PStm newASporadicStm(ILexNameToken opname, List<PExp> args) { ASporadicStm result = new ASporadicStm(); // Statement initialization initStatement(result, opname.getLocation()); result.setOpname(opname); result.setArgs(args); return result; }
public static AAllImport newAAllImport(ILexNameToken name) { AAllImport result = new AAllImport(); result.setLocation(name.getLocation()); result.setName(name); result.setRenamed(null); return result; }
@Override public PType caseASelfObjectDesignator(ASelfObjectDesignator node, TypeCheckInfo question) { PDefinition def = question.env.findName(node.getSelf(), NameScope.NAMES); if (def == null) { TypeCheckerErrors.report(3263, "Cannot reference 'self' from here", node.getSelf().getLocation(), node.getSelf()); return AstFactory.newAUnknownType(node.getSelf().getLocation()); } return question.assistantFactory.createPDefinitionAssistant().getType(def); }
public static ATypeImport newATypeImport(ILexNameToken defname, ILexNameToken renamed) { ATypeImport result = new ATypeImport(); result.setLocation(defname.getLocation()); result.setName(defname); result.setRenamed(renamed); result.setDef(null); return result; }
private LexNameToken consLexNameToken(ILexNameToken defName, String newName, String newModule) { LexNameToken newLexName = new LexNameToken(newModule, newName, defName.getLocation(), defName.getOld(), defName.getExplicit()); newLexName.setTypeQualifier(defName.getTypeQualifier()); return newLexName; } }
public static ARecordInvariantType newARecordInvariantType( ILexNameToken name, List<AFieldField> fields) { ARecordInvariantType result = new ARecordInvariantType(); initType(result, name.getLocation()); initInvariantType(result); result.setName(name); result.setFields(fields); result.setComposed(false); return result; }
public static AObjectPattern newAObjectPattern(ILexNameToken classname, List<ANamePatternPair> list) { AObjectPattern result = new AObjectPattern(); initPattern(result, classname.getLocation()); result.setFields(list); result.setClassname(classname); result.setType(AstFactory.getAUnresolvedType(classname)); return result; }
public static AFunctionValueImport newAFunctionValueImport( ILexNameToken defname, PType type, LexNameList typeParams, ILexNameToken renamed) { AFunctionValueImport result = new AFunctionValueImport(); result.setLocation(defname.getLocation()); result.setName(defname); result.setRenamed(renamed); result.setImportType(type); result.setTypeParams(typeParams); return result; }
public static AAssignmentDefinition newAAssignmentDefinition( ILexNameToken name, PType type, PExp exp) { AAssignmentDefinition result = new AAssignmentDefinition(); initDefinition(result, Pass.VALUES, name.getLocation(), name, NameScope.STATE); result.setType(type); result.setExpression(exp); result.getLocation().executable(false); return result; }
public static ATypeImport newATypeImport(ATypeDefinition def, ILexNameToken renamed) { ATypeImport result = new ATypeImport(); result.setLocation(def.getName().getLocation()); result.setName(def.getName()); result.setRenamed(renamed); result.setDef(def); return result; }
public static AFieldExp newAFieldExp(PExp object, ILexNameToken field) { AFieldExp result = new AFieldExp(); result.setLocation(object.getLocation()); result.setObject(object); result.setField(new LexIdentifierToken(field.getName(), field.getOld(), field.getLocation())); result.setMemberName(field); result.getField().getLocation().executable(true); return result; }