| 1 | // Generated by Cap'n Proto compiler, DO NOT EDIT |
| 2 | // source: lexer.capnp |
| 3 | |
| 4 | #pragma once |
| 5 | |
| 6 | #include <capnp/generated-header-support.h> |
| 7 | #include <kj/windows-sanity.h> |
| 8 | |
| 9 | #if CAPNP_VERSION != 8000 |
| 10 | #error "Version mismatch between generated code and library headers. You must use the same version of the Cap'n Proto compiler and library." |
| 11 | #endif |
| 12 | |
| 13 | |
| 14 | namespace capnp { |
| 15 | namespace schemas { |
| 16 | |
| 17 | CAPNP_DECLARE_SCHEMA(91cc55cd57de5419); |
| 18 | CAPNP_DECLARE_SCHEMA(c6725e678d60fa37); |
| 19 | CAPNP_DECLARE_SCHEMA(9e69a92512b19d18); |
| 20 | CAPNP_DECLARE_SCHEMA(a11f97b9d6c73dd4); |
| 21 | |
| 22 | } // namespace schemas |
| 23 | } // namespace capnp |
| 24 | |
| 25 | namespace capnp { |
| 26 | namespace compiler { |
| 27 | |
| 28 | struct Token { |
| 29 | Token() = delete; |
| 30 | |
| 31 | class Reader; |
| 32 | class Builder; |
| 33 | class Pipeline; |
| 34 | enum Which: uint16_t { |
| 35 | IDENTIFIER, |
| 36 | STRING_LITERAL, |
| 37 | INTEGER_LITERAL, |
| 38 | FLOAT_LITERAL, |
| 39 | OPERATOR, |
| 40 | PARENTHESIZED_LIST, |
| 41 | BRACKETED_LIST, |
| 42 | BINARY_LITERAL, |
| 43 | }; |
| 44 | |
| 45 | struct _capnpPrivate { |
| 46 | CAPNP_DECLARE_STRUCT_HEADER(91cc55cd57de5419, 3, 1) |
| 47 | #if !CAPNP_LITE |
| 48 | static constexpr ::capnp::_::RawBrandedSchema const* brand() { return &schema->defaultBrand; } |
| 49 | #endif // !CAPNP_LITE |
| 50 | }; |
| 51 | }; |
| 52 | |
| 53 | struct Statement { |
| 54 | Statement() = delete; |
| 55 | |
| 56 | class Reader; |
| 57 | class Builder; |
| 58 | class Pipeline; |
| 59 | enum Which: uint16_t { |
| 60 | LINE, |
| 61 | BLOCK, |
| 62 | }; |
| 63 | |
| 64 | struct _capnpPrivate { |
| 65 | CAPNP_DECLARE_STRUCT_HEADER(c6725e678d60fa37, 2, 3) |
| 66 | #if !CAPNP_LITE |
| 67 | static constexpr ::capnp::_::RawBrandedSchema const* brand() { return &schema->defaultBrand; } |
| 68 | #endif // !CAPNP_LITE |
| 69 | }; |
| 70 | }; |
| 71 | |
| 72 | struct LexedTokens { |
| 73 | LexedTokens() = delete; |
| 74 | |
| 75 | class Reader; |
| 76 | class Builder; |
| 77 | class Pipeline; |
| 78 | |
| 79 | struct _capnpPrivate { |
| 80 | CAPNP_DECLARE_STRUCT_HEADER(9e69a92512b19d18, 0, 1) |
| 81 | #if !CAPNP_LITE |
| 82 | static constexpr ::capnp::_::RawBrandedSchema const* brand() { return &schema->defaultBrand; } |
| 83 | #endif // !CAPNP_LITE |
| 84 | }; |
| 85 | }; |
| 86 | |
| 87 | struct LexedStatements { |
| 88 | LexedStatements() = delete; |
| 89 | |
| 90 | class Reader; |
| 91 | class Builder; |
| 92 | class Pipeline; |
| 93 | |
| 94 | struct _capnpPrivate { |
| 95 | CAPNP_DECLARE_STRUCT_HEADER(a11f97b9d6c73dd4, 0, 1) |
| 96 | #if !CAPNP_LITE |
| 97 | static constexpr ::capnp::_::RawBrandedSchema const* brand() { return &schema->defaultBrand; } |
| 98 | #endif // !CAPNP_LITE |
| 99 | }; |
| 100 | }; |
| 101 | |
| 102 | // ======================================================================================= |
| 103 | |
| 104 | class Token::Reader { |
| 105 | public: |
| 106 | typedef Token Reads; |
| 107 | |
| 108 | Reader() = default; |
| 109 | inline explicit Reader(::capnp::_::StructReader base): _reader(base) {} |
| 110 | |
| 111 | inline ::capnp::MessageSize totalSize() const { |
| 112 | return _reader.totalSize().asPublic(); |
| 113 | } |
| 114 | |
| 115 | #if !CAPNP_LITE |
| 116 | inline ::kj::StringTree toString() const { |
| 117 | return ::capnp::_::structString(_reader, *_capnpPrivate::brand()); |
| 118 | } |
| 119 | #endif // !CAPNP_LITE |
| 120 | |
| 121 | inline Which which() const; |
| 122 | inline bool isIdentifier() const; |
| 123 | inline bool hasIdentifier() const; |
| 124 | inline ::capnp::Text::Reader getIdentifier() const; |
| 125 | |
| 126 | inline bool isStringLiteral() const; |
| 127 | inline bool hasStringLiteral() const; |
| 128 | inline ::capnp::Text::Reader getStringLiteral() const; |
| 129 | |
| 130 | inline bool isIntegerLiteral() const; |
| 131 | inline ::uint64_t getIntegerLiteral() const; |
| 132 | |
| 133 | inline bool isFloatLiteral() const; |
| 134 | inline double getFloatLiteral() const; |
| 135 | |
| 136 | inline bool isOperator() const; |
| 137 | inline bool hasOperator() const; |
| 138 | inline ::capnp::Text::Reader getOperator() const; |
| 139 | |
| 140 | inline bool isParenthesizedList() const; |
| 141 | inline bool hasParenthesizedList() const; |
| 142 | inline ::capnp::List< ::capnp::List< ::capnp::compiler::Token, ::capnp::Kind::STRUCT>, ::capnp::Kind::LIST>::Reader getParenthesizedList() const; |
| 143 | |
| 144 | inline bool isBracketedList() const; |
| 145 | inline bool hasBracketedList() const; |
| 146 | inline ::capnp::List< ::capnp::List< ::capnp::compiler::Token, ::capnp::Kind::STRUCT>, ::capnp::Kind::LIST>::Reader getBracketedList() const; |
| 147 | |
| 148 | inline ::uint32_t getStartByte() const; |
| 149 | |
| 150 | inline ::uint32_t getEndByte() const; |
| 151 | |
| 152 | inline bool isBinaryLiteral() const; |
| 153 | inline bool hasBinaryLiteral() const; |
| 154 | inline ::capnp::Data::Reader getBinaryLiteral() const; |
| 155 | |
| 156 | private: |
| 157 | ::capnp::_::StructReader _reader; |
| 158 | template <typename, ::capnp::Kind> |
| 159 | friend struct ::capnp::ToDynamic_; |
| 160 | template <typename, ::capnp::Kind> |
| 161 | friend struct ::capnp::_::PointerHelpers; |
| 162 | template <typename, ::capnp::Kind> |
| 163 | friend struct ::capnp::List; |
| 164 | friend class ::capnp::MessageBuilder; |
| 165 | friend class ::capnp::Orphanage; |
| 166 | }; |
| 167 | |
| 168 | class Token::Builder { |
| 169 | public: |
| 170 | typedef Token Builds; |
| 171 | |
| 172 | Builder() = delete; // Deleted to discourage incorrect usage. |
| 173 | // You can explicitly initialize to nullptr instead. |
| 174 | inline Builder(decltype(nullptr)) {} |
| 175 | inline explicit Builder(::capnp::_::StructBuilder base): _builder(base) {} |
| 176 | inline operator Reader() const { return Reader(_builder.asReader()); } |
| 177 | inline Reader asReader() const { return *this; } |
| 178 | |
| 179 | inline ::capnp::MessageSize totalSize() const { return asReader().totalSize(); } |
| 180 | #if !CAPNP_LITE |
| 181 | inline ::kj::StringTree toString() const { return asReader().toString(); } |
| 182 | #endif // !CAPNP_LITE |
| 183 | |
| 184 | inline Which which(); |
| 185 | inline bool isIdentifier(); |
| 186 | inline bool hasIdentifier(); |
| 187 | inline ::capnp::Text::Builder getIdentifier(); |
| 188 | inline void setIdentifier( ::capnp::Text::Reader value); |
| 189 | inline ::capnp::Text::Builder initIdentifier(unsigned int size); |
| 190 | inline void adoptIdentifier(::capnp::Orphan< ::capnp::Text>&& value); |
| 191 | inline ::capnp::Orphan< ::capnp::Text> disownIdentifier(); |
| 192 | |
| 193 | inline bool isStringLiteral(); |
| 194 | inline bool hasStringLiteral(); |
| 195 | inline ::capnp::Text::Builder getStringLiteral(); |
| 196 | inline void setStringLiteral( ::capnp::Text::Reader value); |
| 197 | inline ::capnp::Text::Builder initStringLiteral(unsigned int size); |
| 198 | inline void adoptStringLiteral(::capnp::Orphan< ::capnp::Text>&& value); |
| 199 | inline ::capnp::Orphan< ::capnp::Text> disownStringLiteral(); |
| 200 | |
| 201 | inline bool isIntegerLiteral(); |
| 202 | inline ::uint64_t getIntegerLiteral(); |
| 203 | inline void setIntegerLiteral( ::uint64_t value); |
| 204 | |
| 205 | inline bool isFloatLiteral(); |
| 206 | inline double getFloatLiteral(); |
| 207 | inline void setFloatLiteral(double value); |
| 208 | |
| 209 | inline bool isOperator(); |
| 210 | inline bool hasOperator(); |
| 211 | inline ::capnp::Text::Builder getOperator(); |
| 212 | inline void setOperator( ::capnp::Text::Reader value); |
| 213 | inline ::capnp::Text::Builder initOperator(unsigned int size); |
| 214 | inline void adoptOperator(::capnp::Orphan< ::capnp::Text>&& value); |
| 215 | inline ::capnp::Orphan< ::capnp::Text> disownOperator(); |
| 216 | |
| 217 | inline bool isParenthesizedList(); |
| 218 | inline bool hasParenthesizedList(); |
| 219 | inline ::capnp::List< ::capnp::List< ::capnp::compiler::Token, ::capnp::Kind::STRUCT>, ::capnp::Kind::LIST>::Builder getParenthesizedList(); |
| 220 | inline void setParenthesizedList( ::capnp::List< ::capnp::List< ::capnp::compiler::Token, ::capnp::Kind::STRUCT>, ::capnp::Kind::LIST>::Reader value); |
| 221 | inline void setParenthesizedList(::kj::ArrayPtr<const ::capnp::List< ::capnp::compiler::Token, ::capnp::Kind::STRUCT>::Reader> value); |
| 222 | inline ::capnp::List< ::capnp::List< ::capnp::compiler::Token, ::capnp::Kind::STRUCT>, ::capnp::Kind::LIST>::Builder initParenthesizedList(unsigned int size); |
| 223 | inline void adoptParenthesizedList(::capnp::Orphan< ::capnp::List< ::capnp::List< ::capnp::compiler::Token, ::capnp::Kind::STRUCT>, ::capnp::Kind::LIST>>&& value); |
| 224 | inline ::capnp::Orphan< ::capnp::List< ::capnp::List< ::capnp::compiler::Token, ::capnp::Kind::STRUCT>, ::capnp::Kind::LIST>> disownParenthesizedList(); |
| 225 | |
| 226 | inline bool isBracketedList(); |
| 227 | inline bool hasBracketedList(); |
| 228 | inline ::capnp::List< ::capnp::List< ::capnp::compiler::Token, ::capnp::Kind::STRUCT>, ::capnp::Kind::LIST>::Builder getBracketedList(); |
| 229 | inline void setBracketedList( ::capnp::List< ::capnp::List< ::capnp::compiler::Token, ::capnp::Kind::STRUCT>, ::capnp::Kind::LIST>::Reader value); |
| 230 | inline void setBracketedList(::kj::ArrayPtr<const ::capnp::List< ::capnp::compiler::Token, ::capnp::Kind::STRUCT>::Reader> value); |
| 231 | inline ::capnp::List< ::capnp::List< ::capnp::compiler::Token, ::capnp::Kind::STRUCT>, ::capnp::Kind::LIST>::Builder initBracketedList(unsigned int size); |
| 232 | inline void adoptBracketedList(::capnp::Orphan< ::capnp::List< ::capnp::List< ::capnp::compiler::Token, ::capnp::Kind::STRUCT>, ::capnp::Kind::LIST>>&& value); |
| 233 | inline ::capnp::Orphan< ::capnp::List< ::capnp::List< ::capnp::compiler::Token, ::capnp::Kind::STRUCT>, ::capnp::Kind::LIST>> disownBracketedList(); |
| 234 | |
| 235 | inline ::uint32_t getStartByte(); |
| 236 | inline void setStartByte( ::uint32_t value); |
| 237 | |
| 238 | inline ::uint32_t getEndByte(); |
| 239 | inline void setEndByte( ::uint32_t value); |
| 240 | |
| 241 | inline bool isBinaryLiteral(); |
| 242 | inline bool hasBinaryLiteral(); |
| 243 | inline ::capnp::Data::Builder getBinaryLiteral(); |
| 244 | inline void setBinaryLiteral( ::capnp::Data::Reader value); |
| 245 | inline ::capnp::Data::Builder initBinaryLiteral(unsigned int size); |
| 246 | inline void adoptBinaryLiteral(::capnp::Orphan< ::capnp::Data>&& value); |
| 247 | inline ::capnp::Orphan< ::capnp::Data> disownBinaryLiteral(); |
| 248 | |
| 249 | private: |
| 250 | ::capnp::_::StructBuilder _builder; |
| 251 | template <typename, ::capnp::Kind> |
| 252 | friend struct ::capnp::ToDynamic_; |
| 253 | friend class ::capnp::Orphanage; |
| 254 | template <typename, ::capnp::Kind> |
| 255 | friend struct ::capnp::_::PointerHelpers; |
| 256 | }; |
| 257 | |
| 258 | #if !CAPNP_LITE |
| 259 | class Token::Pipeline { |
| 260 | public: |
| 261 | typedef Token Pipelines; |
| 262 | |
| 263 | inline Pipeline(decltype(nullptr)): _typeless(nullptr) {} |
| 264 | inline explicit Pipeline(::capnp::AnyPointer::Pipeline&& typeless) |
| 265 | : _typeless(kj::mv(typeless)) {} |
| 266 | |
| 267 | private: |
| 268 | ::capnp::AnyPointer::Pipeline _typeless; |
| 269 | friend class ::capnp::PipelineHook; |
| 270 | template <typename, ::capnp::Kind> |
| 271 | friend struct ::capnp::ToDynamic_; |
| 272 | }; |
| 273 | #endif // !CAPNP_LITE |
| 274 | |
| 275 | class Statement::Reader { |
| 276 | public: |
| 277 | typedef Statement Reads; |
| 278 | |
| 279 | Reader() = default; |
| 280 | inline explicit Reader(::capnp::_::StructReader base): _reader(base) {} |
| 281 | |
| 282 | inline ::capnp::MessageSize totalSize() const { |
| 283 | return _reader.totalSize().asPublic(); |
| 284 | } |
| 285 | |
| 286 | #if !CAPNP_LITE |
| 287 | inline ::kj::StringTree toString() const { |
| 288 | return ::capnp::_::structString(_reader, *_capnpPrivate::brand()); |
| 289 | } |
| 290 | #endif // !CAPNP_LITE |
| 291 | |
| 292 | inline Which which() const; |
| 293 | inline bool hasTokens() const; |
| 294 | inline ::capnp::List< ::capnp::compiler::Token, ::capnp::Kind::STRUCT>::Reader getTokens() const; |
| 295 | |
| 296 | inline bool isLine() const; |
| 297 | inline ::capnp::Void getLine() const; |
| 298 | |
| 299 | inline bool isBlock() const; |
| 300 | inline bool hasBlock() const; |
| 301 | inline ::capnp::List< ::capnp::compiler::Statement, ::capnp::Kind::STRUCT>::Reader getBlock() const; |
| 302 | |
| 303 | inline bool hasDocComment() const; |
| 304 | inline ::capnp::Text::Reader getDocComment() const; |
| 305 | |
| 306 | inline ::uint32_t getStartByte() const; |
| 307 | |
| 308 | inline ::uint32_t getEndByte() const; |
| 309 | |
| 310 | private: |
| 311 | ::capnp::_::StructReader _reader; |
| 312 | template <typename, ::capnp::Kind> |
| 313 | friend struct ::capnp::ToDynamic_; |
| 314 | template <typename, ::capnp::Kind> |
| 315 | friend struct ::capnp::_::PointerHelpers; |
| 316 | template <typename, ::capnp::Kind> |
| 317 | friend struct ::capnp::List; |
| 318 | friend class ::capnp::MessageBuilder; |
| 319 | friend class ::capnp::Orphanage; |
| 320 | }; |
| 321 | |
| 322 | class Statement::Builder { |
| 323 | public: |
| 324 | typedef Statement Builds; |
| 325 | |
| 326 | Builder() = delete; // Deleted to discourage incorrect usage. |
| 327 | // You can explicitly initialize to nullptr instead. |
| 328 | inline Builder(decltype(nullptr)) {} |
| 329 | inline explicit Builder(::capnp::_::StructBuilder base): _builder(base) {} |
| 330 | inline operator Reader() const { return Reader(_builder.asReader()); } |
| 331 | inline Reader asReader() const { return *this; } |
| 332 | |
| 333 | inline ::capnp::MessageSize totalSize() const { return asReader().totalSize(); } |
| 334 | #if !CAPNP_LITE |
| 335 | inline ::kj::StringTree toString() const { return asReader().toString(); } |
| 336 | #endif // !CAPNP_LITE |
| 337 | |
| 338 | inline Which which(); |
| 339 | inline bool hasTokens(); |
| 340 | inline ::capnp::List< ::capnp::compiler::Token, ::capnp::Kind::STRUCT>::Builder getTokens(); |
| 341 | inline void setTokens( ::capnp::List< ::capnp::compiler::Token, ::capnp::Kind::STRUCT>::Reader value); |
| 342 | inline ::capnp::List< ::capnp::compiler::Token, ::capnp::Kind::STRUCT>::Builder initTokens(unsigned int size); |
| 343 | inline void adoptTokens(::capnp::Orphan< ::capnp::List< ::capnp::compiler::Token, ::capnp::Kind::STRUCT>>&& value); |
| 344 | inline ::capnp::Orphan< ::capnp::List< ::capnp::compiler::Token, ::capnp::Kind::STRUCT>> disownTokens(); |
| 345 | |
| 346 | inline bool isLine(); |
| 347 | inline ::capnp::Void getLine(); |
| 348 | inline void setLine( ::capnp::Void value = ::capnp::VOID); |
| 349 | |
| 350 | inline bool isBlock(); |
| 351 | inline bool hasBlock(); |
| 352 | inline ::capnp::List< ::capnp::compiler::Statement, ::capnp::Kind::STRUCT>::Builder getBlock(); |
| 353 | inline void setBlock( ::capnp::List< ::capnp::compiler::Statement, ::capnp::Kind::STRUCT>::Reader value); |
| 354 | inline ::capnp::List< ::capnp::compiler::Statement, ::capnp::Kind::STRUCT>::Builder initBlock(unsigned int size); |
| 355 | inline void adoptBlock(::capnp::Orphan< ::capnp::List< ::capnp::compiler::Statement, ::capnp::Kind::STRUCT>>&& value); |
| 356 | inline ::capnp::Orphan< ::capnp::List< ::capnp::compiler::Statement, ::capnp::Kind::STRUCT>> disownBlock(); |
| 357 | |
| 358 | inline bool hasDocComment(); |
| 359 | inline ::capnp::Text::Builder getDocComment(); |
| 360 | inline void setDocComment( ::capnp::Text::Reader value); |
| 361 | inline ::capnp::Text::Builder initDocComment(unsigned int size); |
| 362 | inline void adoptDocComment(::capnp::Orphan< ::capnp::Text>&& value); |
| 363 | inline ::capnp::Orphan< ::capnp::Text> disownDocComment(); |
| 364 | |
| 365 | inline ::uint32_t getStartByte(); |
| 366 | inline void setStartByte( ::uint32_t value); |
| 367 | |
| 368 | inline ::uint32_t getEndByte(); |
| 369 | inline void setEndByte( ::uint32_t value); |
| 370 | |
| 371 | private: |
| 372 | ::capnp::_::StructBuilder _builder; |
| 373 | template <typename, ::capnp::Kind> |
| 374 | friend struct ::capnp::ToDynamic_; |
| 375 | friend class ::capnp::Orphanage; |
| 376 | template <typename, ::capnp::Kind> |
| 377 | friend struct ::capnp::_::PointerHelpers; |
| 378 | }; |
| 379 | |
| 380 | #if !CAPNP_LITE |
| 381 | class Statement::Pipeline { |
| 382 | public: |
| 383 | typedef Statement Pipelines; |
| 384 | |
| 385 | inline Pipeline(decltype(nullptr)): _typeless(nullptr) {} |
| 386 | inline explicit Pipeline(::capnp::AnyPointer::Pipeline&& typeless) |
| 387 | : _typeless(kj::mv(typeless)) {} |
| 388 | |
| 389 | private: |
| 390 | ::capnp::AnyPointer::Pipeline _typeless; |
| 391 | friend class ::capnp::PipelineHook; |
| 392 | template <typename, ::capnp::Kind> |
| 393 | friend struct ::capnp::ToDynamic_; |
| 394 | }; |
| 395 | #endif // !CAPNP_LITE |
| 396 | |
| 397 | class LexedTokens::Reader { |
| 398 | public: |
| 399 | typedef LexedTokens Reads; |
| 400 | |
| 401 | Reader() = default; |
| 402 | inline explicit Reader(::capnp::_::StructReader base): _reader(base) {} |
| 403 | |
| 404 | inline ::capnp::MessageSize totalSize() const { |
| 405 | return _reader.totalSize().asPublic(); |
| 406 | } |
| 407 | |
| 408 | #if !CAPNP_LITE |
| 409 | inline ::kj::StringTree toString() const { |
| 410 | return ::capnp::_::structString(_reader, *_capnpPrivate::brand()); |
| 411 | } |
| 412 | #endif // !CAPNP_LITE |
| 413 | |
| 414 | inline bool hasTokens() const; |
| 415 | inline ::capnp::List< ::capnp::compiler::Token, ::capnp::Kind::STRUCT>::Reader getTokens() const; |
| 416 | |
| 417 | private: |
| 418 | ::capnp::_::StructReader _reader; |
| 419 | template <typename, ::capnp::Kind> |
| 420 | friend struct ::capnp::ToDynamic_; |
| 421 | template <typename, ::capnp::Kind> |
| 422 | friend struct ::capnp::_::PointerHelpers; |
| 423 | template <typename, ::capnp::Kind> |
| 424 | friend struct ::capnp::List; |
| 425 | friend class ::capnp::MessageBuilder; |
| 426 | friend class ::capnp::Orphanage; |
| 427 | }; |
| 428 | |
| 429 | class LexedTokens::Builder { |
| 430 | public: |
| 431 | typedef LexedTokens Builds; |
| 432 | |
| 433 | Builder() = delete; // Deleted to discourage incorrect usage. |
| 434 | // You can explicitly initialize to nullptr instead. |
| 435 | inline Builder(decltype(nullptr)) {} |
| 436 | inline explicit Builder(::capnp::_::StructBuilder base): _builder(base) {} |
| 437 | inline operator Reader() const { return Reader(_builder.asReader()); } |
| 438 | inline Reader asReader() const { return *this; } |
| 439 | |
| 440 | inline ::capnp::MessageSize totalSize() const { return asReader().totalSize(); } |
| 441 | #if !CAPNP_LITE |
| 442 | inline ::kj::StringTree toString() const { return asReader().toString(); } |
| 443 | #endif // !CAPNP_LITE |
| 444 | |
| 445 | inline bool hasTokens(); |
| 446 | inline ::capnp::List< ::capnp::compiler::Token, ::capnp::Kind::STRUCT>::Builder getTokens(); |
| 447 | inline void setTokens( ::capnp::List< ::capnp::compiler::Token, ::capnp::Kind::STRUCT>::Reader value); |
| 448 | inline ::capnp::List< ::capnp::compiler::Token, ::capnp::Kind::STRUCT>::Builder initTokens(unsigned int size); |
| 449 | inline void adoptTokens(::capnp::Orphan< ::capnp::List< ::capnp::compiler::Token, ::capnp::Kind::STRUCT>>&& value); |
| 450 | inline ::capnp::Orphan< ::capnp::List< ::capnp::compiler::Token, ::capnp::Kind::STRUCT>> disownTokens(); |
| 451 | |
| 452 | private: |
| 453 | ::capnp::_::StructBuilder _builder; |
| 454 | template <typename, ::capnp::Kind> |
| 455 | friend struct ::capnp::ToDynamic_; |
| 456 | friend class ::capnp::Orphanage; |
| 457 | template <typename, ::capnp::Kind> |
| 458 | friend struct ::capnp::_::PointerHelpers; |
| 459 | }; |
| 460 | |
| 461 | #if !CAPNP_LITE |
| 462 | class LexedTokens::Pipeline { |
| 463 | public: |
| 464 | typedef LexedTokens Pipelines; |
| 465 | |
| 466 | inline Pipeline(decltype(nullptr)): _typeless(nullptr) {} |
| 467 | inline explicit Pipeline(::capnp::AnyPointer::Pipeline&& typeless) |
| 468 | : _typeless(kj::mv(typeless)) {} |
| 469 | |
| 470 | private: |
| 471 | ::capnp::AnyPointer::Pipeline _typeless; |
| 472 | friend class ::capnp::PipelineHook; |
| 473 | template <typename, ::capnp::Kind> |
| 474 | friend struct ::capnp::ToDynamic_; |
| 475 | }; |
| 476 | #endif // !CAPNP_LITE |
| 477 | |
| 478 | class LexedStatements::Reader { |
| 479 | public: |
| 480 | typedef LexedStatements Reads; |
| 481 | |
| 482 | Reader() = default; |
| 483 | inline explicit Reader(::capnp::_::StructReader base): _reader(base) {} |
| 484 | |
| 485 | inline ::capnp::MessageSize totalSize() const { |
| 486 | return _reader.totalSize().asPublic(); |
| 487 | } |
| 488 | |
| 489 | #if !CAPNP_LITE |
| 490 | inline ::kj::StringTree toString() const { |
| 491 | return ::capnp::_::structString(_reader, *_capnpPrivate::brand()); |
| 492 | } |
| 493 | #endif // !CAPNP_LITE |
| 494 | |
| 495 | inline bool hasStatements() const; |
| 496 | inline ::capnp::List< ::capnp::compiler::Statement, ::capnp::Kind::STRUCT>::Reader getStatements() const; |
| 497 | |
| 498 | private: |
| 499 | ::capnp::_::StructReader _reader; |
| 500 | template <typename, ::capnp::Kind> |
| 501 | friend struct ::capnp::ToDynamic_; |
| 502 | template <typename, ::capnp::Kind> |
| 503 | friend struct ::capnp::_::PointerHelpers; |
| 504 | template <typename, ::capnp::Kind> |
| 505 | friend struct ::capnp::List; |
| 506 | friend class ::capnp::MessageBuilder; |
| 507 | friend class ::capnp::Orphanage; |
| 508 | }; |
| 509 | |
| 510 | class LexedStatements::Builder { |
| 511 | public: |
| 512 | typedef LexedStatements Builds; |
| 513 | |
| 514 | Builder() = delete; // Deleted to discourage incorrect usage. |
| 515 | // You can explicitly initialize to nullptr instead. |
| 516 | inline Builder(decltype(nullptr)) {} |
| 517 | inline explicit Builder(::capnp::_::StructBuilder base): _builder(base) {} |
| 518 | inline operator Reader() const { return Reader(_builder.asReader()); } |
| 519 | inline Reader asReader() const { return *this; } |
| 520 | |
| 521 | inline ::capnp::MessageSize totalSize() const { return asReader().totalSize(); } |
| 522 | #if !CAPNP_LITE |
| 523 | inline ::kj::StringTree toString() const { return asReader().toString(); } |
| 524 | #endif // !CAPNP_LITE |
| 525 | |
| 526 | inline bool hasStatements(); |
| 527 | inline ::capnp::List< ::capnp::compiler::Statement, ::capnp::Kind::STRUCT>::Builder getStatements(); |
| 528 | inline void setStatements( ::capnp::List< ::capnp::compiler::Statement, ::capnp::Kind::STRUCT>::Reader value); |
| 529 | inline ::capnp::List< ::capnp::compiler::Statement, ::capnp::Kind::STRUCT>::Builder initStatements(unsigned int size); |
| 530 | inline void adoptStatements(::capnp::Orphan< ::capnp::List< ::capnp::compiler::Statement, ::capnp::Kind::STRUCT>>&& value); |
| 531 | inline ::capnp::Orphan< ::capnp::List< ::capnp::compiler::Statement, ::capnp::Kind::STRUCT>> disownStatements(); |
| 532 | |
| 533 | private: |
| 534 | ::capnp::_::StructBuilder _builder; |
| 535 | template <typename, ::capnp::Kind> |
| 536 | friend struct ::capnp::ToDynamic_; |
| 537 | friend class ::capnp::Orphanage; |
| 538 | template <typename, ::capnp::Kind> |
| 539 | friend struct ::capnp::_::PointerHelpers; |
| 540 | }; |
| 541 | |
| 542 | #if !CAPNP_LITE |
| 543 | class LexedStatements::Pipeline { |
| 544 | public: |
| 545 | typedef LexedStatements Pipelines; |
| 546 | |
| 547 | inline Pipeline(decltype(nullptr)): _typeless(nullptr) {} |
| 548 | inline explicit Pipeline(::capnp::AnyPointer::Pipeline&& typeless) |
| 549 | : _typeless(kj::mv(typeless)) {} |
| 550 | |
| 551 | private: |
| 552 | ::capnp::AnyPointer::Pipeline _typeless; |
| 553 | friend class ::capnp::PipelineHook; |
| 554 | template <typename, ::capnp::Kind> |
| 555 | friend struct ::capnp::ToDynamic_; |
| 556 | }; |
| 557 | #endif // !CAPNP_LITE |
| 558 | |
| 559 | // ======================================================================================= |
| 560 | |
| 561 | inline ::capnp::compiler::Token::Which Token::Reader::which() const { |
| 562 | return _reader.getDataField<Which>( |
| 563 | ::capnp::bounded<0>() * ::capnp::ELEMENTS); |
| 564 | } |
| 565 | inline ::capnp::compiler::Token::Which Token::Builder::which() { |
| 566 | return _builder.getDataField<Which>( |
| 567 | ::capnp::bounded<0>() * ::capnp::ELEMENTS); |
| 568 | } |
| 569 | |
| 570 | inline bool Token::Reader::isIdentifier() const { |
| 571 | return which() == Token::IDENTIFIER; |
| 572 | } |
| 573 | inline bool Token::Builder::isIdentifier() { |
| 574 | return which() == Token::IDENTIFIER; |
| 575 | } |
| 576 | inline bool Token::Reader::hasIdentifier() const { |
| 577 | if (which() != Token::IDENTIFIER) return false; |
| 578 | return !_reader.getPointerField( |
| 579 | ::capnp::bounded<0>() * ::capnp::POINTERS).isNull(); |
| 580 | } |
| 581 | inline bool Token::Builder::hasIdentifier() { |
| 582 | if (which() != Token::IDENTIFIER) return false; |
| 583 | return !_builder.getPointerField( |
| 584 | ::capnp::bounded<0>() * ::capnp::POINTERS).isNull(); |
| 585 | } |
| 586 | inline ::capnp::Text::Reader Token::Reader::getIdentifier() const { |
| 587 | KJ_IREQUIRE((which() == Token::IDENTIFIER), |
| 588 | "Must check which() before get()ing a union member." ); |
| 589 | return ::capnp::_::PointerHelpers< ::capnp::Text>::get(_reader.getPointerField( |
| 590 | ::capnp::bounded<0>() * ::capnp::POINTERS)); |
| 591 | } |
| 592 | inline ::capnp::Text::Builder Token::Builder::getIdentifier() { |
| 593 | KJ_IREQUIRE((which() == Token::IDENTIFIER), |
| 594 | "Must check which() before get()ing a union member." ); |
| 595 | return ::capnp::_::PointerHelpers< ::capnp::Text>::get(_builder.getPointerField( |
| 596 | ::capnp::bounded<0>() * ::capnp::POINTERS)); |
| 597 | } |
| 598 | inline void Token::Builder::setIdentifier( ::capnp::Text::Reader value) { |
| 599 | _builder.setDataField<Token::Which>( |
| 600 | ::capnp::bounded<0>() * ::capnp::ELEMENTS, Token::IDENTIFIER); |
| 601 | ::capnp::_::PointerHelpers< ::capnp::Text>::set(_builder.getPointerField( |
| 602 | ::capnp::bounded<0>() * ::capnp::POINTERS), value); |
| 603 | } |
| 604 | inline ::capnp::Text::Builder Token::Builder::initIdentifier(unsigned int size) { |
| 605 | _builder.setDataField<Token::Which>( |
| 606 | ::capnp::bounded<0>() * ::capnp::ELEMENTS, Token::IDENTIFIER); |
| 607 | return ::capnp::_::PointerHelpers< ::capnp::Text>::init(_builder.getPointerField( |
| 608 | ::capnp::bounded<0>() * ::capnp::POINTERS), size); |
| 609 | } |
| 610 | inline void Token::Builder::adoptIdentifier( |
| 611 | ::capnp::Orphan< ::capnp::Text>&& value) { |
| 612 | _builder.setDataField<Token::Which>( |
| 613 | ::capnp::bounded<0>() * ::capnp::ELEMENTS, Token::IDENTIFIER); |
| 614 | ::capnp::_::PointerHelpers< ::capnp::Text>::adopt(_builder.getPointerField( |
| 615 | ::capnp::bounded<0>() * ::capnp::POINTERS), kj::mv(value)); |
| 616 | } |
| 617 | inline ::capnp::Orphan< ::capnp::Text> Token::Builder::disownIdentifier() { |
| 618 | KJ_IREQUIRE((which() == Token::IDENTIFIER), |
| 619 | "Must check which() before get()ing a union member." ); |
| 620 | return ::capnp::_::PointerHelpers< ::capnp::Text>::disown(_builder.getPointerField( |
| 621 | ::capnp::bounded<0>() * ::capnp::POINTERS)); |
| 622 | } |
| 623 | |
| 624 | inline bool Token::Reader::isStringLiteral() const { |
| 625 | return which() == Token::STRING_LITERAL; |
| 626 | } |
| 627 | inline bool Token::Builder::isStringLiteral() { |
| 628 | return which() == Token::STRING_LITERAL; |
| 629 | } |
| 630 | inline bool Token::Reader::hasStringLiteral() const { |
| 631 | if (which() != Token::STRING_LITERAL) return false; |
| 632 | return !_reader.getPointerField( |
| 633 | ::capnp::bounded<0>() * ::capnp::POINTERS).isNull(); |
| 634 | } |
| 635 | inline bool Token::Builder::hasStringLiteral() { |
| 636 | if (which() != Token::STRING_LITERAL) return false; |
| 637 | return !_builder.getPointerField( |
| 638 | ::capnp::bounded<0>() * ::capnp::POINTERS).isNull(); |
| 639 | } |
| 640 | inline ::capnp::Text::Reader Token::Reader::getStringLiteral() const { |
| 641 | KJ_IREQUIRE((which() == Token::STRING_LITERAL), |
| 642 | "Must check which() before get()ing a union member." ); |
| 643 | return ::capnp::_::PointerHelpers< ::capnp::Text>::get(_reader.getPointerField( |
| 644 | ::capnp::bounded<0>() * ::capnp::POINTERS)); |
| 645 | } |
| 646 | inline ::capnp::Text::Builder Token::Builder::getStringLiteral() { |
| 647 | KJ_IREQUIRE((which() == Token::STRING_LITERAL), |
| 648 | "Must check which() before get()ing a union member." ); |
| 649 | return ::capnp::_::PointerHelpers< ::capnp::Text>::get(_builder.getPointerField( |
| 650 | ::capnp::bounded<0>() * ::capnp::POINTERS)); |
| 651 | } |
| 652 | inline void Token::Builder::setStringLiteral( ::capnp::Text::Reader value) { |
| 653 | _builder.setDataField<Token::Which>( |
| 654 | ::capnp::bounded<0>() * ::capnp::ELEMENTS, Token::STRING_LITERAL); |
| 655 | ::capnp::_::PointerHelpers< ::capnp::Text>::set(_builder.getPointerField( |
| 656 | ::capnp::bounded<0>() * ::capnp::POINTERS), value); |
| 657 | } |
| 658 | inline ::capnp::Text::Builder Token::Builder::initStringLiteral(unsigned int size) { |
| 659 | _builder.setDataField<Token::Which>( |
| 660 | ::capnp::bounded<0>() * ::capnp::ELEMENTS, Token::STRING_LITERAL); |
| 661 | return ::capnp::_::PointerHelpers< ::capnp::Text>::init(_builder.getPointerField( |
| 662 | ::capnp::bounded<0>() * ::capnp::POINTERS), size); |
| 663 | } |
| 664 | inline void Token::Builder::adoptStringLiteral( |
| 665 | ::capnp::Orphan< ::capnp::Text>&& value) { |
| 666 | _builder.setDataField<Token::Which>( |
| 667 | ::capnp::bounded<0>() * ::capnp::ELEMENTS, Token::STRING_LITERAL); |
| 668 | ::capnp::_::PointerHelpers< ::capnp::Text>::adopt(_builder.getPointerField( |
| 669 | ::capnp::bounded<0>() * ::capnp::POINTERS), kj::mv(value)); |
| 670 | } |
| 671 | inline ::capnp::Orphan< ::capnp::Text> Token::Builder::disownStringLiteral() { |
| 672 | KJ_IREQUIRE((which() == Token::STRING_LITERAL), |
| 673 | "Must check which() before get()ing a union member." ); |
| 674 | return ::capnp::_::PointerHelpers< ::capnp::Text>::disown(_builder.getPointerField( |
| 675 | ::capnp::bounded<0>() * ::capnp::POINTERS)); |
| 676 | } |
| 677 | |
| 678 | inline bool Token::Reader::isIntegerLiteral() const { |
| 679 | return which() == Token::INTEGER_LITERAL; |
| 680 | } |
| 681 | inline bool Token::Builder::isIntegerLiteral() { |
| 682 | return which() == Token::INTEGER_LITERAL; |
| 683 | } |
| 684 | inline ::uint64_t Token::Reader::getIntegerLiteral() const { |
| 685 | KJ_IREQUIRE((which() == Token::INTEGER_LITERAL), |
| 686 | "Must check which() before get()ing a union member." ); |
| 687 | return _reader.getDataField< ::uint64_t>( |
| 688 | ::capnp::bounded<1>() * ::capnp::ELEMENTS); |
| 689 | } |
| 690 | |
| 691 | inline ::uint64_t Token::Builder::getIntegerLiteral() { |
| 692 | KJ_IREQUIRE((which() == Token::INTEGER_LITERAL), |
| 693 | "Must check which() before get()ing a union member." ); |
| 694 | return _builder.getDataField< ::uint64_t>( |
| 695 | ::capnp::bounded<1>() * ::capnp::ELEMENTS); |
| 696 | } |
| 697 | inline void Token::Builder::setIntegerLiteral( ::uint64_t value) { |
| 698 | _builder.setDataField<Token::Which>( |
| 699 | ::capnp::bounded<0>() * ::capnp::ELEMENTS, Token::INTEGER_LITERAL); |
| 700 | _builder.setDataField< ::uint64_t>( |
| 701 | ::capnp::bounded<1>() * ::capnp::ELEMENTS, value); |
| 702 | } |
| 703 | |
| 704 | inline bool Token::Reader::isFloatLiteral() const { |
| 705 | return which() == Token::FLOAT_LITERAL; |
| 706 | } |
| 707 | inline bool Token::Builder::isFloatLiteral() { |
| 708 | return which() == Token::FLOAT_LITERAL; |
| 709 | } |
| 710 | inline double Token::Reader::getFloatLiteral() const { |
| 711 | KJ_IREQUIRE((which() == Token::FLOAT_LITERAL), |
| 712 | "Must check which() before get()ing a union member." ); |
| 713 | return _reader.getDataField<double>( |
| 714 | ::capnp::bounded<1>() * ::capnp::ELEMENTS); |
| 715 | } |
| 716 | |
| 717 | inline double Token::Builder::getFloatLiteral() { |
| 718 | KJ_IREQUIRE((which() == Token::FLOAT_LITERAL), |
| 719 | "Must check which() before get()ing a union member." ); |
| 720 | return _builder.getDataField<double>( |
| 721 | ::capnp::bounded<1>() * ::capnp::ELEMENTS); |
| 722 | } |
| 723 | inline void Token::Builder::setFloatLiteral(double value) { |
| 724 | _builder.setDataField<Token::Which>( |
| 725 | ::capnp::bounded<0>() * ::capnp::ELEMENTS, Token::FLOAT_LITERAL); |
| 726 | _builder.setDataField<double>( |
| 727 | ::capnp::bounded<1>() * ::capnp::ELEMENTS, value); |
| 728 | } |
| 729 | |
| 730 | inline bool Token::Reader::isOperator() const { |
| 731 | return which() == Token::OPERATOR; |
| 732 | } |
| 733 | inline bool Token::Builder::isOperator() { |
| 734 | return which() == Token::OPERATOR; |
| 735 | } |
| 736 | inline bool Token::Reader::hasOperator() const { |
| 737 | if (which() != Token::OPERATOR) return false; |
| 738 | return !_reader.getPointerField( |
| 739 | ::capnp::bounded<0>() * ::capnp::POINTERS).isNull(); |
| 740 | } |
| 741 | inline bool Token::Builder::hasOperator() { |
| 742 | if (which() != Token::OPERATOR) return false; |
| 743 | return !_builder.getPointerField( |
| 744 | ::capnp::bounded<0>() * ::capnp::POINTERS).isNull(); |
| 745 | } |
| 746 | inline ::capnp::Text::Reader Token::Reader::getOperator() const { |
| 747 | KJ_IREQUIRE((which() == Token::OPERATOR), |
| 748 | "Must check which() before get()ing a union member." ); |
| 749 | return ::capnp::_::PointerHelpers< ::capnp::Text>::get(_reader.getPointerField( |
| 750 | ::capnp::bounded<0>() * ::capnp::POINTERS)); |
| 751 | } |
| 752 | inline ::capnp::Text::Builder Token::Builder::getOperator() { |
| 753 | KJ_IREQUIRE((which() == Token::OPERATOR), |
| 754 | "Must check which() before get()ing a union member." ); |
| 755 | return ::capnp::_::PointerHelpers< ::capnp::Text>::get(_builder.getPointerField( |
| 756 | ::capnp::bounded<0>() * ::capnp::POINTERS)); |
| 757 | } |
| 758 | inline void Token::Builder::setOperator( ::capnp::Text::Reader value) { |
| 759 | _builder.setDataField<Token::Which>( |
| 760 | ::capnp::bounded<0>() * ::capnp::ELEMENTS, Token::OPERATOR); |
| 761 | ::capnp::_::PointerHelpers< ::capnp::Text>::set(_builder.getPointerField( |
| 762 | ::capnp::bounded<0>() * ::capnp::POINTERS), value); |
| 763 | } |
| 764 | inline ::capnp::Text::Builder Token::Builder::initOperator(unsigned int size) { |
| 765 | _builder.setDataField<Token::Which>( |
| 766 | ::capnp::bounded<0>() * ::capnp::ELEMENTS, Token::OPERATOR); |
| 767 | return ::capnp::_::PointerHelpers< ::capnp::Text>::init(_builder.getPointerField( |
| 768 | ::capnp::bounded<0>() * ::capnp::POINTERS), size); |
| 769 | } |
| 770 | inline void Token::Builder::adoptOperator( |
| 771 | ::capnp::Orphan< ::capnp::Text>&& value) { |
| 772 | _builder.setDataField<Token::Which>( |
| 773 | ::capnp::bounded<0>() * ::capnp::ELEMENTS, Token::OPERATOR); |
| 774 | ::capnp::_::PointerHelpers< ::capnp::Text>::adopt(_builder.getPointerField( |
| 775 | ::capnp::bounded<0>() * ::capnp::POINTERS), kj::mv(value)); |
| 776 | } |
| 777 | inline ::capnp::Orphan< ::capnp::Text> Token::Builder::disownOperator() { |
| 778 | KJ_IREQUIRE((which() == Token::OPERATOR), |
| 779 | "Must check which() before get()ing a union member." ); |
| 780 | return ::capnp::_::PointerHelpers< ::capnp::Text>::disown(_builder.getPointerField( |
| 781 | ::capnp::bounded<0>() * ::capnp::POINTERS)); |
| 782 | } |
| 783 | |
| 784 | inline bool Token::Reader::isParenthesizedList() const { |
| 785 | return which() == Token::PARENTHESIZED_LIST; |
| 786 | } |
| 787 | inline bool Token::Builder::isParenthesizedList() { |
| 788 | return which() == Token::PARENTHESIZED_LIST; |
| 789 | } |
| 790 | inline bool Token::Reader::hasParenthesizedList() const { |
| 791 | if (which() != Token::PARENTHESIZED_LIST) return false; |
| 792 | return !_reader.getPointerField( |
| 793 | ::capnp::bounded<0>() * ::capnp::POINTERS).isNull(); |
| 794 | } |
| 795 | inline bool Token::Builder::hasParenthesizedList() { |
| 796 | if (which() != Token::PARENTHESIZED_LIST) return false; |
| 797 | return !_builder.getPointerField( |
| 798 | ::capnp::bounded<0>() * ::capnp::POINTERS).isNull(); |
| 799 | } |
| 800 | inline ::capnp::List< ::capnp::List< ::capnp::compiler::Token, ::capnp::Kind::STRUCT>, ::capnp::Kind::LIST>::Reader Token::Reader::getParenthesizedList() const { |
| 801 | KJ_IREQUIRE((which() == Token::PARENTHESIZED_LIST), |
| 802 | "Must check which() before get()ing a union member." ); |
| 803 | return ::capnp::_::PointerHelpers< ::capnp::List< ::capnp::List< ::capnp::compiler::Token, ::capnp::Kind::STRUCT>, ::capnp::Kind::LIST>>::get(_reader.getPointerField( |
| 804 | ::capnp::bounded<0>() * ::capnp::POINTERS)); |
| 805 | } |
| 806 | inline ::capnp::List< ::capnp::List< ::capnp::compiler::Token, ::capnp::Kind::STRUCT>, ::capnp::Kind::LIST>::Builder Token::Builder::getParenthesizedList() { |
| 807 | KJ_IREQUIRE((which() == Token::PARENTHESIZED_LIST), |
| 808 | "Must check which() before get()ing a union member." ); |
| 809 | return ::capnp::_::PointerHelpers< ::capnp::List< ::capnp::List< ::capnp::compiler::Token, ::capnp::Kind::STRUCT>, ::capnp::Kind::LIST>>::get(_builder.getPointerField( |
| 810 | ::capnp::bounded<0>() * ::capnp::POINTERS)); |
| 811 | } |
| 812 | inline void Token::Builder::setParenthesizedList( ::capnp::List< ::capnp::List< ::capnp::compiler::Token, ::capnp::Kind::STRUCT>, ::capnp::Kind::LIST>::Reader value) { |
| 813 | _builder.setDataField<Token::Which>( |
| 814 | ::capnp::bounded<0>() * ::capnp::ELEMENTS, Token::PARENTHESIZED_LIST); |
| 815 | ::capnp::_::PointerHelpers< ::capnp::List< ::capnp::List< ::capnp::compiler::Token, ::capnp::Kind::STRUCT>, ::capnp::Kind::LIST>>::set(_builder.getPointerField( |
| 816 | ::capnp::bounded<0>() * ::capnp::POINTERS), value); |
| 817 | } |
| 818 | inline void Token::Builder::setParenthesizedList(::kj::ArrayPtr<const ::capnp::List< ::capnp::compiler::Token, ::capnp::Kind::STRUCT>::Reader> value) { |
| 819 | _builder.setDataField<Token::Which>( |
| 820 | ::capnp::bounded<0>() * ::capnp::ELEMENTS, Token::PARENTHESIZED_LIST); |
| 821 | ::capnp::_::PointerHelpers< ::capnp::List< ::capnp::List< ::capnp::compiler::Token, ::capnp::Kind::STRUCT>, ::capnp::Kind::LIST>>::set(_builder.getPointerField( |
| 822 | ::capnp::bounded<0>() * ::capnp::POINTERS), value); |
| 823 | } |
| 824 | inline ::capnp::List< ::capnp::List< ::capnp::compiler::Token, ::capnp::Kind::STRUCT>, ::capnp::Kind::LIST>::Builder Token::Builder::initParenthesizedList(unsigned int size) { |
| 825 | _builder.setDataField<Token::Which>( |
| 826 | ::capnp::bounded<0>() * ::capnp::ELEMENTS, Token::PARENTHESIZED_LIST); |
| 827 | return ::capnp::_::PointerHelpers< ::capnp::List< ::capnp::List< ::capnp::compiler::Token, ::capnp::Kind::STRUCT>, ::capnp::Kind::LIST>>::init(_builder.getPointerField( |
| 828 | ::capnp::bounded<0>() * ::capnp::POINTERS), size); |
| 829 | } |
| 830 | inline void Token::Builder::adoptParenthesizedList( |
| 831 | ::capnp::Orphan< ::capnp::List< ::capnp::List< ::capnp::compiler::Token, ::capnp::Kind::STRUCT>, ::capnp::Kind::LIST>>&& value) { |
| 832 | _builder.setDataField<Token::Which>( |
| 833 | ::capnp::bounded<0>() * ::capnp::ELEMENTS, Token::PARENTHESIZED_LIST); |
| 834 | ::capnp::_::PointerHelpers< ::capnp::List< ::capnp::List< ::capnp::compiler::Token, ::capnp::Kind::STRUCT>, ::capnp::Kind::LIST>>::adopt(_builder.getPointerField( |
| 835 | ::capnp::bounded<0>() * ::capnp::POINTERS), kj::mv(value)); |
| 836 | } |
| 837 | inline ::capnp::Orphan< ::capnp::List< ::capnp::List< ::capnp::compiler::Token, ::capnp::Kind::STRUCT>, ::capnp::Kind::LIST>> Token::Builder::disownParenthesizedList() { |
| 838 | KJ_IREQUIRE((which() == Token::PARENTHESIZED_LIST), |
| 839 | "Must check which() before get()ing a union member." ); |
| 840 | return ::capnp::_::PointerHelpers< ::capnp::List< ::capnp::List< ::capnp::compiler::Token, ::capnp::Kind::STRUCT>, ::capnp::Kind::LIST>>::disown(_builder.getPointerField( |
| 841 | ::capnp::bounded<0>() * ::capnp::POINTERS)); |
| 842 | } |
| 843 | |
| 844 | inline bool Token::Reader::isBracketedList() const { |
| 845 | return which() == Token::BRACKETED_LIST; |
| 846 | } |
| 847 | inline bool Token::Builder::isBracketedList() { |
| 848 | return which() == Token::BRACKETED_LIST; |
| 849 | } |
| 850 | inline bool Token::Reader::hasBracketedList() const { |
| 851 | if (which() != Token::BRACKETED_LIST) return false; |
| 852 | return !_reader.getPointerField( |
| 853 | ::capnp::bounded<0>() * ::capnp::POINTERS).isNull(); |
| 854 | } |
| 855 | inline bool Token::Builder::hasBracketedList() { |
| 856 | if (which() != Token::BRACKETED_LIST) return false; |
| 857 | return !_builder.getPointerField( |
| 858 | ::capnp::bounded<0>() * ::capnp::POINTERS).isNull(); |
| 859 | } |
| 860 | inline ::capnp::List< ::capnp::List< ::capnp::compiler::Token, ::capnp::Kind::STRUCT>, ::capnp::Kind::LIST>::Reader Token::Reader::getBracketedList() const { |
| 861 | KJ_IREQUIRE((which() == Token::BRACKETED_LIST), |
| 862 | "Must check which() before get()ing a union member." ); |
| 863 | return ::capnp::_::PointerHelpers< ::capnp::List< ::capnp::List< ::capnp::compiler::Token, ::capnp::Kind::STRUCT>, ::capnp::Kind::LIST>>::get(_reader.getPointerField( |
| 864 | ::capnp::bounded<0>() * ::capnp::POINTERS)); |
| 865 | } |
| 866 | inline ::capnp::List< ::capnp::List< ::capnp::compiler::Token, ::capnp::Kind::STRUCT>, ::capnp::Kind::LIST>::Builder Token::Builder::getBracketedList() { |
| 867 | KJ_IREQUIRE((which() == Token::BRACKETED_LIST), |
| 868 | "Must check which() before get()ing a union member." ); |
| 869 | return ::capnp::_::PointerHelpers< ::capnp::List< ::capnp::List< ::capnp::compiler::Token, ::capnp::Kind::STRUCT>, ::capnp::Kind::LIST>>::get(_builder.getPointerField( |
| 870 | ::capnp::bounded<0>() * ::capnp::POINTERS)); |
| 871 | } |
| 872 | inline void Token::Builder::setBracketedList( ::capnp::List< ::capnp::List< ::capnp::compiler::Token, ::capnp::Kind::STRUCT>, ::capnp::Kind::LIST>::Reader value) { |
| 873 | _builder.setDataField<Token::Which>( |
| 874 | ::capnp::bounded<0>() * ::capnp::ELEMENTS, Token::BRACKETED_LIST); |
| 875 | ::capnp::_::PointerHelpers< ::capnp::List< ::capnp::List< ::capnp::compiler::Token, ::capnp::Kind::STRUCT>, ::capnp::Kind::LIST>>::set(_builder.getPointerField( |
| 876 | ::capnp::bounded<0>() * ::capnp::POINTERS), value); |
| 877 | } |
| 878 | inline void Token::Builder::setBracketedList(::kj::ArrayPtr<const ::capnp::List< ::capnp::compiler::Token, ::capnp::Kind::STRUCT>::Reader> value) { |
| 879 | _builder.setDataField<Token::Which>( |
| 880 | ::capnp::bounded<0>() * ::capnp::ELEMENTS, Token::BRACKETED_LIST); |
| 881 | ::capnp::_::PointerHelpers< ::capnp::List< ::capnp::List< ::capnp::compiler::Token, ::capnp::Kind::STRUCT>, ::capnp::Kind::LIST>>::set(_builder.getPointerField( |
| 882 | ::capnp::bounded<0>() * ::capnp::POINTERS), value); |
| 883 | } |
| 884 | inline ::capnp::List< ::capnp::List< ::capnp::compiler::Token, ::capnp::Kind::STRUCT>, ::capnp::Kind::LIST>::Builder Token::Builder::initBracketedList(unsigned int size) { |
| 885 | _builder.setDataField<Token::Which>( |
| 886 | ::capnp::bounded<0>() * ::capnp::ELEMENTS, Token::BRACKETED_LIST); |
| 887 | return ::capnp::_::PointerHelpers< ::capnp::List< ::capnp::List< ::capnp::compiler::Token, ::capnp::Kind::STRUCT>, ::capnp::Kind::LIST>>::init(_builder.getPointerField( |
| 888 | ::capnp::bounded<0>() * ::capnp::POINTERS), size); |
| 889 | } |
| 890 | inline void Token::Builder::adoptBracketedList( |
| 891 | ::capnp::Orphan< ::capnp::List< ::capnp::List< ::capnp::compiler::Token, ::capnp::Kind::STRUCT>, ::capnp::Kind::LIST>>&& value) { |
| 892 | _builder.setDataField<Token::Which>( |
| 893 | ::capnp::bounded<0>() * ::capnp::ELEMENTS, Token::BRACKETED_LIST); |
| 894 | ::capnp::_::PointerHelpers< ::capnp::List< ::capnp::List< ::capnp::compiler::Token, ::capnp::Kind::STRUCT>, ::capnp::Kind::LIST>>::adopt(_builder.getPointerField( |
| 895 | ::capnp::bounded<0>() * ::capnp::POINTERS), kj::mv(value)); |
| 896 | } |
| 897 | inline ::capnp::Orphan< ::capnp::List< ::capnp::List< ::capnp::compiler::Token, ::capnp::Kind::STRUCT>, ::capnp::Kind::LIST>> Token::Builder::disownBracketedList() { |
| 898 | KJ_IREQUIRE((which() == Token::BRACKETED_LIST), |
| 899 | "Must check which() before get()ing a union member." ); |
| 900 | return ::capnp::_::PointerHelpers< ::capnp::List< ::capnp::List< ::capnp::compiler::Token, ::capnp::Kind::STRUCT>, ::capnp::Kind::LIST>>::disown(_builder.getPointerField( |
| 901 | ::capnp::bounded<0>() * ::capnp::POINTERS)); |
| 902 | } |
| 903 | |
| 904 | inline ::uint32_t Token::Reader::getStartByte() const { |
| 905 | return _reader.getDataField< ::uint32_t>( |
| 906 | ::capnp::bounded<1>() * ::capnp::ELEMENTS); |
| 907 | } |
| 908 | |
| 909 | inline ::uint32_t Token::Builder::getStartByte() { |
| 910 | return _builder.getDataField< ::uint32_t>( |
| 911 | ::capnp::bounded<1>() * ::capnp::ELEMENTS); |
| 912 | } |
| 913 | inline void Token::Builder::setStartByte( ::uint32_t value) { |
| 914 | _builder.setDataField< ::uint32_t>( |
| 915 | ::capnp::bounded<1>() * ::capnp::ELEMENTS, value); |
| 916 | } |
| 917 | |
| 918 | inline ::uint32_t Token::Reader::getEndByte() const { |
| 919 | return _reader.getDataField< ::uint32_t>( |
| 920 | ::capnp::bounded<4>() * ::capnp::ELEMENTS); |
| 921 | } |
| 922 | |
| 923 | inline ::uint32_t Token::Builder::getEndByte() { |
| 924 | return _builder.getDataField< ::uint32_t>( |
| 925 | ::capnp::bounded<4>() * ::capnp::ELEMENTS); |
| 926 | } |
| 927 | inline void Token::Builder::setEndByte( ::uint32_t value) { |
| 928 | _builder.setDataField< ::uint32_t>( |
| 929 | ::capnp::bounded<4>() * ::capnp::ELEMENTS, value); |
| 930 | } |
| 931 | |
| 932 | inline bool Token::Reader::isBinaryLiteral() const { |
| 933 | return which() == Token::BINARY_LITERAL; |
| 934 | } |
| 935 | inline bool Token::Builder::isBinaryLiteral() { |
| 936 | return which() == Token::BINARY_LITERAL; |
| 937 | } |
| 938 | inline bool Token::Reader::hasBinaryLiteral() const { |
| 939 | if (which() != Token::BINARY_LITERAL) return false; |
| 940 | return !_reader.getPointerField( |
| 941 | ::capnp::bounded<0>() * ::capnp::POINTERS).isNull(); |
| 942 | } |
| 943 | inline bool Token::Builder::hasBinaryLiteral() { |
| 944 | if (which() != Token::BINARY_LITERAL) return false; |
| 945 | return !_builder.getPointerField( |
| 946 | ::capnp::bounded<0>() * ::capnp::POINTERS).isNull(); |
| 947 | } |
| 948 | inline ::capnp::Data::Reader Token::Reader::getBinaryLiteral() const { |
| 949 | KJ_IREQUIRE((which() == Token::BINARY_LITERAL), |
| 950 | "Must check which() before get()ing a union member." ); |
| 951 | return ::capnp::_::PointerHelpers< ::capnp::Data>::get(_reader.getPointerField( |
| 952 | ::capnp::bounded<0>() * ::capnp::POINTERS)); |
| 953 | } |
| 954 | inline ::capnp::Data::Builder Token::Builder::getBinaryLiteral() { |
| 955 | KJ_IREQUIRE((which() == Token::BINARY_LITERAL), |
| 956 | "Must check which() before get()ing a union member." ); |
| 957 | return ::capnp::_::PointerHelpers< ::capnp::Data>::get(_builder.getPointerField( |
| 958 | ::capnp::bounded<0>() * ::capnp::POINTERS)); |
| 959 | } |
| 960 | inline void Token::Builder::setBinaryLiteral( ::capnp::Data::Reader value) { |
| 961 | _builder.setDataField<Token::Which>( |
| 962 | ::capnp::bounded<0>() * ::capnp::ELEMENTS, Token::BINARY_LITERAL); |
| 963 | ::capnp::_::PointerHelpers< ::capnp::Data>::set(_builder.getPointerField( |
| 964 | ::capnp::bounded<0>() * ::capnp::POINTERS), value); |
| 965 | } |
| 966 | inline ::capnp::Data::Builder Token::Builder::initBinaryLiteral(unsigned int size) { |
| 967 | _builder.setDataField<Token::Which>( |
| 968 | ::capnp::bounded<0>() * ::capnp::ELEMENTS, Token::BINARY_LITERAL); |
| 969 | return ::capnp::_::PointerHelpers< ::capnp::Data>::init(_builder.getPointerField( |
| 970 | ::capnp::bounded<0>() * ::capnp::POINTERS), size); |
| 971 | } |
| 972 | inline void Token::Builder::adoptBinaryLiteral( |
| 973 | ::capnp::Orphan< ::capnp::Data>&& value) { |
| 974 | _builder.setDataField<Token::Which>( |
| 975 | ::capnp::bounded<0>() * ::capnp::ELEMENTS, Token::BINARY_LITERAL); |
| 976 | ::capnp::_::PointerHelpers< ::capnp::Data>::adopt(_builder.getPointerField( |
| 977 | ::capnp::bounded<0>() * ::capnp::POINTERS), kj::mv(value)); |
| 978 | } |
| 979 | inline ::capnp::Orphan< ::capnp::Data> Token::Builder::disownBinaryLiteral() { |
| 980 | KJ_IREQUIRE((which() == Token::BINARY_LITERAL), |
| 981 | "Must check which() before get()ing a union member." ); |
| 982 | return ::capnp::_::PointerHelpers< ::capnp::Data>::disown(_builder.getPointerField( |
| 983 | ::capnp::bounded<0>() * ::capnp::POINTERS)); |
| 984 | } |
| 985 | |
| 986 | inline ::capnp::compiler::Statement::Which Statement::Reader::which() const { |
| 987 | return _reader.getDataField<Which>( |
| 988 | ::capnp::bounded<0>() * ::capnp::ELEMENTS); |
| 989 | } |
| 990 | inline ::capnp::compiler::Statement::Which Statement::Builder::which() { |
| 991 | return _builder.getDataField<Which>( |
| 992 | ::capnp::bounded<0>() * ::capnp::ELEMENTS); |
| 993 | } |
| 994 | |
| 995 | inline bool Statement::Reader::hasTokens() const { |
| 996 | return !_reader.getPointerField( |
| 997 | ::capnp::bounded<0>() * ::capnp::POINTERS).isNull(); |
| 998 | } |
| 999 | inline bool Statement::Builder::hasTokens() { |
| 1000 | return !_builder.getPointerField( |
| 1001 | ::capnp::bounded<0>() * ::capnp::POINTERS).isNull(); |
| 1002 | } |
| 1003 | inline ::capnp::List< ::capnp::compiler::Token, ::capnp::Kind::STRUCT>::Reader Statement::Reader::getTokens() const { |
| 1004 | return ::capnp::_::PointerHelpers< ::capnp::List< ::capnp::compiler::Token, ::capnp::Kind::STRUCT>>::get(_reader.getPointerField( |
| 1005 | ::capnp::bounded<0>() * ::capnp::POINTERS)); |
| 1006 | } |
| 1007 | inline ::capnp::List< ::capnp::compiler::Token, ::capnp::Kind::STRUCT>::Builder Statement::Builder::getTokens() { |
| 1008 | return ::capnp::_::PointerHelpers< ::capnp::List< ::capnp::compiler::Token, ::capnp::Kind::STRUCT>>::get(_builder.getPointerField( |
| 1009 | ::capnp::bounded<0>() * ::capnp::POINTERS)); |
| 1010 | } |
| 1011 | inline void Statement::Builder::setTokens( ::capnp::List< ::capnp::compiler::Token, ::capnp::Kind::STRUCT>::Reader value) { |
| 1012 | ::capnp::_::PointerHelpers< ::capnp::List< ::capnp::compiler::Token, ::capnp::Kind::STRUCT>>::set(_builder.getPointerField( |
| 1013 | ::capnp::bounded<0>() * ::capnp::POINTERS), value); |
| 1014 | } |
| 1015 | inline ::capnp::List< ::capnp::compiler::Token, ::capnp::Kind::STRUCT>::Builder Statement::Builder::initTokens(unsigned int size) { |
| 1016 | return ::capnp::_::PointerHelpers< ::capnp::List< ::capnp::compiler::Token, ::capnp::Kind::STRUCT>>::init(_builder.getPointerField( |
| 1017 | ::capnp::bounded<0>() * ::capnp::POINTERS), size); |
| 1018 | } |
| 1019 | inline void Statement::Builder::adoptTokens( |
| 1020 | ::capnp::Orphan< ::capnp::List< ::capnp::compiler::Token, ::capnp::Kind::STRUCT>>&& value) { |
| 1021 | ::capnp::_::PointerHelpers< ::capnp::List< ::capnp::compiler::Token, ::capnp::Kind::STRUCT>>::adopt(_builder.getPointerField( |
| 1022 | ::capnp::bounded<0>() * ::capnp::POINTERS), kj::mv(value)); |
| 1023 | } |
| 1024 | inline ::capnp::Orphan< ::capnp::List< ::capnp::compiler::Token, ::capnp::Kind::STRUCT>> Statement::Builder::disownTokens() { |
| 1025 | return ::capnp::_::PointerHelpers< ::capnp::List< ::capnp::compiler::Token, ::capnp::Kind::STRUCT>>::disown(_builder.getPointerField( |
| 1026 | ::capnp::bounded<0>() * ::capnp::POINTERS)); |
| 1027 | } |
| 1028 | |
| 1029 | inline bool Statement::Reader::isLine() const { |
| 1030 | return which() == Statement::LINE; |
| 1031 | } |
| 1032 | inline bool Statement::Builder::isLine() { |
| 1033 | return which() == Statement::LINE; |
| 1034 | } |
| 1035 | inline ::capnp::Void Statement::Reader::getLine() const { |
| 1036 | KJ_IREQUIRE((which() == Statement::LINE), |
| 1037 | "Must check which() before get()ing a union member." ); |
| 1038 | return _reader.getDataField< ::capnp::Void>( |
| 1039 | ::capnp::bounded<0>() * ::capnp::ELEMENTS); |
| 1040 | } |
| 1041 | |
| 1042 | inline ::capnp::Void Statement::Builder::getLine() { |
| 1043 | KJ_IREQUIRE((which() == Statement::LINE), |
| 1044 | "Must check which() before get()ing a union member." ); |
| 1045 | return _builder.getDataField< ::capnp::Void>( |
| 1046 | ::capnp::bounded<0>() * ::capnp::ELEMENTS); |
| 1047 | } |
| 1048 | inline void Statement::Builder::setLine( ::capnp::Void value) { |
| 1049 | _builder.setDataField<Statement::Which>( |
| 1050 | ::capnp::bounded<0>() * ::capnp::ELEMENTS, Statement::LINE); |
| 1051 | _builder.setDataField< ::capnp::Void>( |
| 1052 | ::capnp::bounded<0>() * ::capnp::ELEMENTS, value); |
| 1053 | } |
| 1054 | |
| 1055 | inline bool Statement::Reader::isBlock() const { |
| 1056 | return which() == Statement::BLOCK; |
| 1057 | } |
| 1058 | inline bool Statement::Builder::isBlock() { |
| 1059 | return which() == Statement::BLOCK; |
| 1060 | } |
| 1061 | inline bool Statement::Reader::hasBlock() const { |
| 1062 | if (which() != Statement::BLOCK) return false; |
| 1063 | return !_reader.getPointerField( |
| 1064 | ::capnp::bounded<1>() * ::capnp::POINTERS).isNull(); |
| 1065 | } |
| 1066 | inline bool Statement::Builder::hasBlock() { |
| 1067 | if (which() != Statement::BLOCK) return false; |
| 1068 | return !_builder.getPointerField( |
| 1069 | ::capnp::bounded<1>() * ::capnp::POINTERS).isNull(); |
| 1070 | } |
| 1071 | inline ::capnp::List< ::capnp::compiler::Statement, ::capnp::Kind::STRUCT>::Reader Statement::Reader::getBlock() const { |
| 1072 | KJ_IREQUIRE((which() == Statement::BLOCK), |
| 1073 | "Must check which() before get()ing a union member." ); |
| 1074 | return ::capnp::_::PointerHelpers< ::capnp::List< ::capnp::compiler::Statement, ::capnp::Kind::STRUCT>>::get(_reader.getPointerField( |
| 1075 | ::capnp::bounded<1>() * ::capnp::POINTERS)); |
| 1076 | } |
| 1077 | inline ::capnp::List< ::capnp::compiler::Statement, ::capnp::Kind::STRUCT>::Builder Statement::Builder::getBlock() { |
| 1078 | KJ_IREQUIRE((which() == Statement::BLOCK), |
| 1079 | "Must check which() before get()ing a union member." ); |
| 1080 | return ::capnp::_::PointerHelpers< ::capnp::List< ::capnp::compiler::Statement, ::capnp::Kind::STRUCT>>::get(_builder.getPointerField( |
| 1081 | ::capnp::bounded<1>() * ::capnp::POINTERS)); |
| 1082 | } |
| 1083 | inline void Statement::Builder::setBlock( ::capnp::List< ::capnp::compiler::Statement, ::capnp::Kind::STRUCT>::Reader value) { |
| 1084 | _builder.setDataField<Statement::Which>( |
| 1085 | ::capnp::bounded<0>() * ::capnp::ELEMENTS, Statement::BLOCK); |
| 1086 | ::capnp::_::PointerHelpers< ::capnp::List< ::capnp::compiler::Statement, ::capnp::Kind::STRUCT>>::set(_builder.getPointerField( |
| 1087 | ::capnp::bounded<1>() * ::capnp::POINTERS), value); |
| 1088 | } |
| 1089 | inline ::capnp::List< ::capnp::compiler::Statement, ::capnp::Kind::STRUCT>::Builder Statement::Builder::initBlock(unsigned int size) { |
| 1090 | _builder.setDataField<Statement::Which>( |
| 1091 | ::capnp::bounded<0>() * ::capnp::ELEMENTS, Statement::BLOCK); |
| 1092 | return ::capnp::_::PointerHelpers< ::capnp::List< ::capnp::compiler::Statement, ::capnp::Kind::STRUCT>>::init(_builder.getPointerField( |
| 1093 | ::capnp::bounded<1>() * ::capnp::POINTERS), size); |
| 1094 | } |
| 1095 | inline void Statement::Builder::adoptBlock( |
| 1096 | ::capnp::Orphan< ::capnp::List< ::capnp::compiler::Statement, ::capnp::Kind::STRUCT>>&& value) { |
| 1097 | _builder.setDataField<Statement::Which>( |
| 1098 | ::capnp::bounded<0>() * ::capnp::ELEMENTS, Statement::BLOCK); |
| 1099 | ::capnp::_::PointerHelpers< ::capnp::List< ::capnp::compiler::Statement, ::capnp::Kind::STRUCT>>::adopt(_builder.getPointerField( |
| 1100 | ::capnp::bounded<1>() * ::capnp::POINTERS), kj::mv(value)); |
| 1101 | } |
| 1102 | inline ::capnp::Orphan< ::capnp::List< ::capnp::compiler::Statement, ::capnp::Kind::STRUCT>> Statement::Builder::disownBlock() { |
| 1103 | KJ_IREQUIRE((which() == Statement::BLOCK), |
| 1104 | "Must check which() before get()ing a union member." ); |
| 1105 | return ::capnp::_::PointerHelpers< ::capnp::List< ::capnp::compiler::Statement, ::capnp::Kind::STRUCT>>::disown(_builder.getPointerField( |
| 1106 | ::capnp::bounded<1>() * ::capnp::POINTERS)); |
| 1107 | } |
| 1108 | |
| 1109 | inline bool Statement::Reader::() const { |
| 1110 | return !_reader.getPointerField( |
| 1111 | ::capnp::bounded<2>() * ::capnp::POINTERS).isNull(); |
| 1112 | } |
| 1113 | inline bool Statement::Builder::() { |
| 1114 | return !_builder.getPointerField( |
| 1115 | ::capnp::bounded<2>() * ::capnp::POINTERS).isNull(); |
| 1116 | } |
| 1117 | inline ::capnp::Text::Reader Statement::Reader::() const { |
| 1118 | return ::capnp::_::PointerHelpers< ::capnp::Text>::get(_reader.getPointerField( |
| 1119 | ::capnp::bounded<2>() * ::capnp::POINTERS)); |
| 1120 | } |
| 1121 | inline ::capnp::Text::Builder Statement::Builder::() { |
| 1122 | return ::capnp::_::PointerHelpers< ::capnp::Text>::get(_builder.getPointerField( |
| 1123 | ::capnp::bounded<2>() * ::capnp::POINTERS)); |
| 1124 | } |
| 1125 | inline void Statement::Builder::( ::capnp::Text::Reader value) { |
| 1126 | ::capnp::_::PointerHelpers< ::capnp::Text>::set(_builder.getPointerField( |
| 1127 | ::capnp::bounded<2>() * ::capnp::POINTERS), value); |
| 1128 | } |
| 1129 | inline ::capnp::Text::Builder Statement::Builder::(unsigned int size) { |
| 1130 | return ::capnp::_::PointerHelpers< ::capnp::Text>::init(_builder.getPointerField( |
| 1131 | ::capnp::bounded<2>() * ::capnp::POINTERS), size); |
| 1132 | } |
| 1133 | inline void Statement::Builder::( |
| 1134 | ::capnp::Orphan< ::capnp::Text>&& value) { |
| 1135 | ::capnp::_::PointerHelpers< ::capnp::Text>::adopt(_builder.getPointerField( |
| 1136 | ::capnp::bounded<2>() * ::capnp::POINTERS), kj::mv(value)); |
| 1137 | } |
| 1138 | inline ::capnp::Orphan< ::capnp::Text> Statement::Builder::() { |
| 1139 | return ::capnp::_::PointerHelpers< ::capnp::Text>::disown(_builder.getPointerField( |
| 1140 | ::capnp::bounded<2>() * ::capnp::POINTERS)); |
| 1141 | } |
| 1142 | |
| 1143 | inline ::uint32_t Statement::Reader::getStartByte() const { |
| 1144 | return _reader.getDataField< ::uint32_t>( |
| 1145 | ::capnp::bounded<1>() * ::capnp::ELEMENTS); |
| 1146 | } |
| 1147 | |
| 1148 | inline ::uint32_t Statement::Builder::getStartByte() { |
| 1149 | return _builder.getDataField< ::uint32_t>( |
| 1150 | ::capnp::bounded<1>() * ::capnp::ELEMENTS); |
| 1151 | } |
| 1152 | inline void Statement::Builder::setStartByte( ::uint32_t value) { |
| 1153 | _builder.setDataField< ::uint32_t>( |
| 1154 | ::capnp::bounded<1>() * ::capnp::ELEMENTS, value); |
| 1155 | } |
| 1156 | |
| 1157 | inline ::uint32_t Statement::Reader::getEndByte() const { |
| 1158 | return _reader.getDataField< ::uint32_t>( |
| 1159 | ::capnp::bounded<2>() * ::capnp::ELEMENTS); |
| 1160 | } |
| 1161 | |
| 1162 | inline ::uint32_t Statement::Builder::getEndByte() { |
| 1163 | return _builder.getDataField< ::uint32_t>( |
| 1164 | ::capnp::bounded<2>() * ::capnp::ELEMENTS); |
| 1165 | } |
| 1166 | inline void Statement::Builder::setEndByte( ::uint32_t value) { |
| 1167 | _builder.setDataField< ::uint32_t>( |
| 1168 | ::capnp::bounded<2>() * ::capnp::ELEMENTS, value); |
| 1169 | } |
| 1170 | |
| 1171 | inline bool LexedTokens::Reader::hasTokens() const { |
| 1172 | return !_reader.getPointerField( |
| 1173 | ::capnp::bounded<0>() * ::capnp::POINTERS).isNull(); |
| 1174 | } |
| 1175 | inline bool LexedTokens::Builder::hasTokens() { |
| 1176 | return !_builder.getPointerField( |
| 1177 | ::capnp::bounded<0>() * ::capnp::POINTERS).isNull(); |
| 1178 | } |
| 1179 | inline ::capnp::List< ::capnp::compiler::Token, ::capnp::Kind::STRUCT>::Reader LexedTokens::Reader::getTokens() const { |
| 1180 | return ::capnp::_::PointerHelpers< ::capnp::List< ::capnp::compiler::Token, ::capnp::Kind::STRUCT>>::get(_reader.getPointerField( |
| 1181 | ::capnp::bounded<0>() * ::capnp::POINTERS)); |
| 1182 | } |
| 1183 | inline ::capnp::List< ::capnp::compiler::Token, ::capnp::Kind::STRUCT>::Builder LexedTokens::Builder::getTokens() { |
| 1184 | return ::capnp::_::PointerHelpers< ::capnp::List< ::capnp::compiler::Token, ::capnp::Kind::STRUCT>>::get(_builder.getPointerField( |
| 1185 | ::capnp::bounded<0>() * ::capnp::POINTERS)); |
| 1186 | } |
| 1187 | inline void LexedTokens::Builder::setTokens( ::capnp::List< ::capnp::compiler::Token, ::capnp::Kind::STRUCT>::Reader value) { |
| 1188 | ::capnp::_::PointerHelpers< ::capnp::List< ::capnp::compiler::Token, ::capnp::Kind::STRUCT>>::set(_builder.getPointerField( |
| 1189 | ::capnp::bounded<0>() * ::capnp::POINTERS), value); |
| 1190 | } |
| 1191 | inline ::capnp::List< ::capnp::compiler::Token, ::capnp::Kind::STRUCT>::Builder LexedTokens::Builder::initTokens(unsigned int size) { |
| 1192 | return ::capnp::_::PointerHelpers< ::capnp::List< ::capnp::compiler::Token, ::capnp::Kind::STRUCT>>::init(_builder.getPointerField( |
| 1193 | ::capnp::bounded<0>() * ::capnp::POINTERS), size); |
| 1194 | } |
| 1195 | inline void LexedTokens::Builder::adoptTokens( |
| 1196 | ::capnp::Orphan< ::capnp::List< ::capnp::compiler::Token, ::capnp::Kind::STRUCT>>&& value) { |
| 1197 | ::capnp::_::PointerHelpers< ::capnp::List< ::capnp::compiler::Token, ::capnp::Kind::STRUCT>>::adopt(_builder.getPointerField( |
| 1198 | ::capnp::bounded<0>() * ::capnp::POINTERS), kj::mv(value)); |
| 1199 | } |
| 1200 | inline ::capnp::Orphan< ::capnp::List< ::capnp::compiler::Token, ::capnp::Kind::STRUCT>> LexedTokens::Builder::disownTokens() { |
| 1201 | return ::capnp::_::PointerHelpers< ::capnp::List< ::capnp::compiler::Token, ::capnp::Kind::STRUCT>>::disown(_builder.getPointerField( |
| 1202 | ::capnp::bounded<0>() * ::capnp::POINTERS)); |
| 1203 | } |
| 1204 | |
| 1205 | inline bool LexedStatements::Reader::hasStatements() const { |
| 1206 | return !_reader.getPointerField( |
| 1207 | ::capnp::bounded<0>() * ::capnp::POINTERS).isNull(); |
| 1208 | } |
| 1209 | inline bool LexedStatements::Builder::hasStatements() { |
| 1210 | return !_builder.getPointerField( |
| 1211 | ::capnp::bounded<0>() * ::capnp::POINTERS).isNull(); |
| 1212 | } |
| 1213 | inline ::capnp::List< ::capnp::compiler::Statement, ::capnp::Kind::STRUCT>::Reader LexedStatements::Reader::getStatements() const { |
| 1214 | return ::capnp::_::PointerHelpers< ::capnp::List< ::capnp::compiler::Statement, ::capnp::Kind::STRUCT>>::get(_reader.getPointerField( |
| 1215 | ::capnp::bounded<0>() * ::capnp::POINTERS)); |
| 1216 | } |
| 1217 | inline ::capnp::List< ::capnp::compiler::Statement, ::capnp::Kind::STRUCT>::Builder LexedStatements::Builder::getStatements() { |
| 1218 | return ::capnp::_::PointerHelpers< ::capnp::List< ::capnp::compiler::Statement, ::capnp::Kind::STRUCT>>::get(_builder.getPointerField( |
| 1219 | ::capnp::bounded<0>() * ::capnp::POINTERS)); |
| 1220 | } |
| 1221 | inline void LexedStatements::Builder::setStatements( ::capnp::List< ::capnp::compiler::Statement, ::capnp::Kind::STRUCT>::Reader value) { |
| 1222 | ::capnp::_::PointerHelpers< ::capnp::List< ::capnp::compiler::Statement, ::capnp::Kind::STRUCT>>::set(_builder.getPointerField( |
| 1223 | ::capnp::bounded<0>() * ::capnp::POINTERS), value); |
| 1224 | } |
| 1225 | inline ::capnp::List< ::capnp::compiler::Statement, ::capnp::Kind::STRUCT>::Builder LexedStatements::Builder::initStatements(unsigned int size) { |
| 1226 | return ::capnp::_::PointerHelpers< ::capnp::List< ::capnp::compiler::Statement, ::capnp::Kind::STRUCT>>::init(_builder.getPointerField( |
| 1227 | ::capnp::bounded<0>() * ::capnp::POINTERS), size); |
| 1228 | } |
| 1229 | inline void LexedStatements::Builder::adoptStatements( |
| 1230 | ::capnp::Orphan< ::capnp::List< ::capnp::compiler::Statement, ::capnp::Kind::STRUCT>>&& value) { |
| 1231 | ::capnp::_::PointerHelpers< ::capnp::List< ::capnp::compiler::Statement, ::capnp::Kind::STRUCT>>::adopt(_builder.getPointerField( |
| 1232 | ::capnp::bounded<0>() * ::capnp::POINTERS), kj::mv(value)); |
| 1233 | } |
| 1234 | inline ::capnp::Orphan< ::capnp::List< ::capnp::compiler::Statement, ::capnp::Kind::STRUCT>> LexedStatements::Builder::disownStatements() { |
| 1235 | return ::capnp::_::PointerHelpers< ::capnp::List< ::capnp::compiler::Statement, ::capnp::Kind::STRUCT>>::disown(_builder.getPointerField( |
| 1236 | ::capnp::bounded<0>() * ::capnp::POINTERS)); |
| 1237 | } |
| 1238 | |
| 1239 | } // namespace |
| 1240 | } // namespace |
| 1241 | |
| 1242 | |