public override syntax_tree_node BuildTreeInSpecialMode(string FileName, string Text)
        {
            Errors.Clear();
            localparserhelper = new GPPGParserHelper(Errors, Warnings, FileName);
            syntax_tree_node root = localparserhelper.Parse(Text);

            return(root);
        }
        public override syntax_tree_node BuildTreeInStatementMode(string FileName, string Text)
        {
            Text = String.Concat("<<statement>>", Environment.NewLine, Text);
            localparserhelper = new GPPGParserHelper(Errors, Warnings, FileName);
            // localparser.parsertools.LineCorrection = -1;
            syntax_tree_node root = localparserhelper.Parse(Text);

            return(root as statement);
        }
        public override syntax_tree_node BuildTreeInTypeExprMode(string FileName, string Text)
        {
            // LineCorrection = -1 не забыть
            Text = String.Concat("<<type>>", Environment.NewLine, Text);
            localparserhelper = new GPPGParserHelper(Errors, Warnings, FileName);
            // localparser.parsertools.LineCorrection = -1;
            syntax_tree_node root = localparserhelper.Parse(Text);

            return(root as expression);
        }
        public override syntax_tree_node BuildTreeInNormalMode(string FileName, string Text, List <string> DefinesList = null)
        {
            Errors.Clear();
            Warnings.Clear();

            /*string[] file_names = new string[1];
             * file_names[0] = FileName;
             *
             * preprocessor2.Build(file_names, Errors, null);*/

            PreprocessorParserHelper preprocessor3 = new PreprocessorParserHelper(Errors, FileName);
            var b = preprocessor3.Parse(Text);

            if (Errors.Count > 0)
            {
                return(null);
            }

            localparserhelper             = new GPPGParserHelper(Errors, Warnings, FileName);
            localparserhelper.DefinesList = DefinesList;
            syntax_tree_node root = localparserhelper.Parse(Text);

            if (Errors.Count > 0)
            {
                return(null);
            }

            if (root != null && root is compilation_unit)
            {
                (root as compilation_unit).file_name = FileName;
            }

            /*if (preprocessor2.CompilerDirectives != null && preprocessor2.CompilerDirectives.Count != 0)
             *  CompilerDirectives.AddRange(preprocessor2.CompilerDirectives);*/

            if (preprocessor3.compilerDirectives != null && preprocessor3.compilerDirectives.Count != 0)
            {
                CompilerDirectives.AddRange(preprocessor3.compilerDirectives);
            }

            return(root);
        }