1
# if ! defined(TS_CONFIG_TYPES_HEADER)
2
# define TS_CONFIG_TYPES_HEADER
6
Basic types for configuration parsing.
8
Copyright 2010 Network Geographics, Inc.
10
Licensed under the Apache License, Version 2.0 (the "License");
11
you may not use this file except in compliance with the License.
12
You may obtain a copy of the License at
14
http://www.apache.org/licenses/LICENSE-2.0
16
Unless required by applicable law or agreed to in writing, software
17
distributed under the License is distributed on an "AS IS" BASIS,
18
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
19
See the License for the specific language governing permissions and
20
limitations under the License.
23
# if defined(_MSC_VER)
29
# if defined(__cplusplus)
30
namespace ts { namespace config {
33
/** A location in the source stream.
34
@internal At some point we may need to add stream information,
35
e.g. file name, once includes are supported. Or should that
36
be the caller's responsibility?
39
int _col; ///< Column.
43
/** A token from the source stream.
44
@internal We should use ts::Buffer here, but because this
45
has to work in C as well, it's less painful to do it by hand.
48
char* _s; ///< Text of token.
49
size_t _n; ///< Text length.
50
int _type; ///< Type of token.
51
struct Location _loc; ///< Location of token.
54
# if defined(__cplusplus)
55
}} // namespace ts::config
56
# define YYSTYPE ts::config::Token
58
# define YYSTYPE struct Token
62
# endif // TS_CONFIG_TYPES_HEADER