blob: a1959586b03c8d0d929e08236f136368a782b294 [file] [log] [blame]
copilot-swe-agent[bot]c3ced622025-11-18 18:09:06 +00001// Licensed to the Apache Software Foundation(ASF) under one
2// or more contributor license agreements.See the NOTICE file
3// distributed with this work for additional information
4// regarding copyright ownership.The ASF licenses this file
5// to you under the Apache License, Version 2.0 (the
6// "License"); you may not use this file except in compliance
7// with the License. You may obtain a copy of the License at
8//
9// http://www.apache.org/licenses/LICENSE-2.0
10//
11// Unless required by applicable law or agreed to in writing,
12// software distributed under the License is distributed on an
13// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14// KIND, either express or implied. See the License for the
15// specific language governing permissions and limitations
16// under the License.
17
18// Minimal global definitions needed when building compiler tests without src/thrift/main.cc
19
20#include "thrift/globals.h"
21
22#include <string>
23#include <vector>
24
25// Additional globals normally defined in src/thrift/main.cc
26t_program* g_program = nullptr;
27t_scope* g_scope = nullptr;
28t_scope* g_parent_scope = nullptr;
29std::string g_parent_prefix;
30PARSE_MODE g_parse_mode = PROGRAM;
31
32int g_strict = 127;
33
34char* g_time_str = nullptr;
35char* g_doctext = nullptr;
36char* g_program_doctext_candidate = nullptr;
37
38int g_allow_neg_field_keys = 0;
39int g_allow_64bit_consts = 0;
40
41std::string g_curdir;
42std::string g_curpath;
43std::vector<std::string> g_incl_searchpath;
44
45bool g_return_failure = false;