internal static SemanticError InvalidUseOfUnaryMinusOperator(TigerNode node) { return(new SemanticError() { Message = string.Format("The expression of the unary minus operator must be an integer."), Node = node }); }
internal static SemanticError TypeNoLongerVisible(TypeNode type, TigerNode node) { return(new SemanticError() { Message = string.Format("Type '{0}' is not longer visible at this scope.", type.Name), Node = node }); }
internal static SemanticError InvalidArrayAccess(TigerNode node) { return(new SemanticError() { Message = string.Format("Invalid array access. Index expression must be of type int."), Node = node }); }
public static SemanticError InvalidNumber(string literal, TigerNode node) { return(new SemanticError { Message = string.Format("'{0}' is not a valid number.", literal), Node = node }); }
public static SemanticError FunctionUsedAsVariable(string name, TigerNode node) { return(new SemanticError { Message = string.Format("Function '{0}' used as variable or constant.", name), Node = node }); }
public static SemanticError TypeDoesNotExist(string typeID, TigerNode node) { return(new SemanticError() { Message = string.Format("The type name '{0}' could not be found.", typeID), Node = node }); }
public static SemanticError CycleInTypeDeclaration(string type, TigerNode node) { return(new SemanticError() { Message = string.Format("Cycle detected defininig type '{0}'.", type), Node = node }); }
internal static SemanticError InvalidUseOfAssignmentToAReadonlyVariable(TigerNode node) { return(new SemanticError() { Message = string.Format("Invalid use of assignment to a readonly variable."), Node = node }); }
public static SemanticError PreviousFieldDeclaration(string name, TigerNode node) { return(new SemanticError() { Message = string.Format("The field '{0}' is already defined in this record.", name), Node = node }); }
public static SemanticError IdentifierExpectedKeywordGiven(string keyword, TigerNode node) { return(new SemanticError() { Message = string.Format("Identifier expected; '{0}' is a keyword.", keyword), Node = node }); }
public static SemanticError PreviousTypeDeclaration(string name, TigerNode node) { return(new SemanticError() { Message = string.Format("A type '{0}' is already defined in this scope.", name), Node = node }); }
public static SemanticError InvalidTypeInference(TypeNode type, TigerNode node) { return(new SemanticError() { Message = string.Format("Cannot assign <{0}> to an implicitly-typed variable.", type.Name), Node = node }); }
public static SemanticError InvalidIntNilAssignation(TigerNode node) { return(new SemanticError() { Message = "Cannot convert null to 'int' because it is a non-nullable value type.", Node = node }); }
internal static SemanticError IncompatibleTypesInIfThenElse(TigerNode node) { return(new SemanticError() { Message = string.Format("Expressions in if-then-else must be of the same type or both not return a value."), Node = node }); }
public static SemanticError ProcedureCannotReturn(string name, TigerNode node) { return(new SemanticError() { Message = string.Format("Procedure '{0}' cannot return.", name), Node = node }); }
internal static SemanticError ArrayTypeExpected(TypeNode type, TigerNode node) { return(new SemanticError() { Message = string.Format("Array type expected, type '{0}' given.", type.Name), Node = node }); }
public static SemanticError FunctionMustReturn(string name, TigerNode node) { return(new SemanticError() { Message = string.Format("Function '{0}' must return.", name), Node = node }); }
public static SemanticError UndefinedVariableUsed(string name, TigerNode node) { return(new SemanticError { Message = string.Format("Variable '{0}' does not exist.", name), Node = node }); }
internal static SemanticError VariableMustHaveAType(string name, TigerNode node) { return(new SemanticError() { Message = string.Format("Cannot assign void expression to variable '{0}'.", name), Node = node }); }
public static SemanticError FunctionDoesNotExist(string name, TigerNode node) { return(new SemanticError { Message = string.Format("Function '{0}' does not exist.", name), Node = node }); }
public static SemanticError InvalidIndexingOperation(TypeNode type, TigerNode node) { return(new SemanticError { Message = string.Format("Cannot apply indexing with [] to an expression of type '{0}'.", type.Name), Node = node }); }