public static Dictionary <string, Func <string[], string> > getMessages(WhileLoopErrors theLogicOrder)
        {
            Dictionary <string, Func <string[], string> > messages = new Dictionary <string, Func <string[], string> > ();

            messages.Add(WhileErrorType.missingIndentOperator.ToString(), theLogicOrder.missingIndentOperator);
            messages.Add(WhileErrorType.unknownFormat.ToString(), theLogicOrder.unknownFormat);

            return(messages);
        }
 /// Inits second part of the language errors. Stores error messages in dictionary.
 public void initLanguageErrors2(WhileLoopErrors While, NumberErrors Number, KeywordErrors Keyword, FunctionErrors Function, OtherErrors Other, SystemFailureErrors system)
 {
     errorMessages.Add(ErrorType.WhileLoop, WhileErrorsOrder.getMessages(While));
     errorMessages.Add(ErrorType.Number, NumberErrorsOrder.getMessages(Number));
     errorMessages.Add(ErrorType.Keyword, KeywordErrorsOrder.getMessages(Keyword));
     errorMessages.Add(ErrorType.Function, FunctionErrorsOrder.getMessages(Function));
     errorMessages.Add(ErrorType.Other, OtherErrorsOrder.getMessages(Other));
     errorMessages.Add(ErrorType.System, SystemFailureErrorsOrder.getMessages(system));
 }
        public static Func <string[], string>[] getStatements(WhileLoopErrors theLogicOrder)
        {
            List <Func <string[], string> > statements = new List <Func <string[], string> > ();

            statements.Add(theLogicOrder.missingIndentOperator);
            statements.Add(theLogicOrder.unknownFormat);


            return(statements.ToArray());
        }
        public static void setLanguage()
        {
            currentLanguage = new SwedishLanguage();
            IErrorSender theSender = (currentLanguage as IErrorSender);

            IfStatementErrors   ifError     = theSender.ifStatementErrors;
            ElseStatementErrors elseError   = theSender.elseStatementErrors;
            ForLoopErrors       forError    = theSender.forLoopErrors;
            IndentationErrors   indentError = theSender.indentErrors;
            TextErrors          txtError    = theSender.textErrors;
            VariableErrors      varError    = theSender.variableErrors;

            WhileLoopErrors     whileError   = theSender.whileLoopErrors;
            NumberErrors        numError     = theSender.numberErrors;
            KeywordErrors       keywordError = theSender.keywordErrors;
            FunctionErrors      funcError    = theSender.functionErrors;
            OtherErrors         otherError   = theSender.otherErrors;
            SystemFailureErrors systemErrors = theSender.systemErrors;

            currentLanguage.initLanguageErrors1(ifError, elseError, forError, indentError, txtError, varError);
            currentLanguage.initLanguageErrors2(whileError, numError, keywordError, funcError, otherError, systemErrors);
        }