public for_node NewForStmt(bool opt_var, ident identifier, type_definition for_stmt_decl_or_assign,
                                       expression expr1, for_cycle_type fc_type, expression expr2, token_info opt_tk_do, statement stmt,
                                       LexLocation loc)
            {
                var nfs = new for_node(identifier, expr1, expr2, stmt, fc_type, null, for_stmt_decl_or_assign,
                                       opt_var != false, loc);

                if (opt_tk_do == null)
                {
                    file_position    fp      = expr2.source_context.end_position;
                    syntax_tree_node err_stn = stmt;
                    if (err_stn == null)
                    {
                        err_stn = expr2;
                    }
                    parsertools.errors.Add(new PABCNETUnexpectedToken(parsertools.CurrentFileName,
                                                                      StringResources.Get("TKDO"),
                                                                      new SourceContext(fp.line_num, fp.column_num + 1, fp.line_num, fp.column_num + 1, 0, 0),
                                                                      err_stn));
                }

                if (!opt_var && for_stmt_decl_or_assign == null)
                {
                    parsertools.AddWarningFromResource("USING_UNLOCAL_FOR_VARIABLE", identifier.source_context);
                }
                return(nfs);
            }
        public while_node NewWhileStmt(token_info tkWhile, expression expr, token_info opt_tk_do, statement stmt, LexLocation loc)
        {
            var nws = new while_node(expr, stmt, WhileCycleType.While, loc);

            if (opt_tk_do == null)
            {
                file_position    fp      = expr.source_context.end_position;
                syntax_tree_node err_stn = stmt;
                if (err_stn == null)
                {
                    err_stn = expr;
                }
                parsertools.errors.Add(new PABCNETUnexpectedToken(parsertools.CurrentFileName, StringResources.Get("TKDO"), new SourceContext(fp.line_num, fp.column_num + 1, fp.line_num, fp.column_num + 1, 0, 0), err_stn));
            }
            return(nws);
        }
        public void create_source_context_right(object to, object right)
        {
            file_position fp = ((syntax_tree_node)right).source_context.end_position;

            ((syntax_tree_node)to).source_context = new SourceContext(fp.line_num, fp.column_num, fp.line_num, fp.column_num, 0, 0);
        }
        public void create_source_context_left(object to, object left)
        {
            file_position fp = ((syntax_tree_node)left).source_context.begin_position;

            ((syntax_tree_node)to).source_context = new SourceContext(fp.line_num, fp.column_num, fp.line_num, fp.column_num, 0, 0);
        }