コード例 #1
0
ファイル: Builder.cs プロジェクト: rufolangus/LAOInterpreter
 void LoadingAttempted(ConfigLoader.ConfigStatus status)
 {
     switch (status)
     {
         case ConfigLoader.ConfigStatus.FileNotFound:
             Logger.LogError("config.conf not found.");
             break;
         case ConfigLoader.ConfigStatus.ParsingError:
             Logger.LogError("Parsing Config File.");
             break;
     }
 }
コード例 #2
0
ファイル: Builder.cs プロジェクト: rufolangus/LAOInterpreter
        public Builder(string[] args)
        {
            loader = new ConfigLoader();
            loader.LoadingFailed += LoadingAttempted;
            opParser = new OperatorConfigParser();
            opParser.ParsedSuccesfully += OnParsedSuccesfully;
            sParser = new StatementConfigParser();
            sParser.ParsedSuccesfully += OnParsedSuccesfully;
            gParser = new GenericConfigParser();
            gParser.ParsedSuccesfully += OnParsedSuccesfully;
            loader.AttemptLoad(operatorFilePath,opParser);
            loader.AttemptLoad(statementFilePath, sParser);
            loader.AttemptLoad(genericsFilePath, gParser);
            if (args.Length > 0)
                this.args = args;

        }