lexer.capnp.h 50.8 KB
Newer Older
1 2
// Generated by Cap'n Proto compiler, DO NOT EDIT
// source: lexer.capnp
3

4
#pragma once
5 6 7

#include <capnp/generated-header-support.h>

8
#if CAPNP_VERSION != 7000
9 10 11 12
#error "Version mismatch between generated code and library headers.  You must use the same version of the Cap'n Proto compiler and library."
#endif


13 14 15
namespace capnp {
namespace schemas {

16 17 18 19
CAPNP_DECLARE_SCHEMA(91cc55cd57de5419);
CAPNP_DECLARE_SCHEMA(c6725e678d60fa37);
CAPNP_DECLARE_SCHEMA(9e69a92512b19d18);
CAPNP_DECLARE_SCHEMA(a11f97b9d6c73dd4);
20 21 22 23

}  // namespace schemas
}  // namespace capnp

24 25 26 27 28 29 30 31
namespace capnp {
namespace compiler {

struct Token {
  Token() = delete;

  class Reader;
  class Builder;
32
  class Pipeline;
33
  enum Which: uint16_t {
34 35 36 37 38 39 40
    IDENTIFIER,
    STRING_LITERAL,
    INTEGER_LITERAL,
    FLOAT_LITERAL,
    OPERATOR,
    PARENTHESIZED_LIST,
    BRACKETED_LIST,
Jason Choy's avatar
Jason Choy committed
41
    BINARY_LITERAL,
42
  };
43

44 45 46
  struct _capnpPrivate {
    CAPNP_DECLARE_STRUCT_HEADER(91cc55cd57de5419, 3, 1)
    #if !CAPNP_LITE
47
    static constexpr ::capnp::_::RawBrandedSchema const* brand() { return &schema->defaultBrand; }
48 49
    #endif  // !CAPNP_LITE
  };
50 51 52 53 54 55 56
};

struct Statement {
  Statement() = delete;

  class Reader;
  class Builder;
57
  class Pipeline;
58
  enum Which: uint16_t {
59 60
    LINE,
    BLOCK,
61
  };
62

63 64 65
  struct _capnpPrivate {
    CAPNP_DECLARE_STRUCT_HEADER(c6725e678d60fa37, 2, 3)
    #if !CAPNP_LITE
66
    static constexpr ::capnp::_::RawBrandedSchema const* brand() { return &schema->defaultBrand; }
67 68
    #endif  // !CAPNP_LITE
  };
69 70 71 72 73 74 75
};

struct LexedTokens {
  LexedTokens() = delete;

  class Reader;
  class Builder;
76
  class Pipeline;
77

78 79 80
  struct _capnpPrivate {
    CAPNP_DECLARE_STRUCT_HEADER(9e69a92512b19d18, 0, 1)
    #if !CAPNP_LITE
81
    static constexpr ::capnp::_::RawBrandedSchema const* brand() { return &schema->defaultBrand; }
82 83
    #endif  // !CAPNP_LITE
  };
84 85 86 87 88 89 90
};

struct LexedStatements {
  LexedStatements() = delete;

  class Reader;
  class Builder;
91
  class Pipeline;
92

93 94 95
  struct _capnpPrivate {
    CAPNP_DECLARE_STRUCT_HEADER(a11f97b9d6c73dd4, 0, 1)
    #if !CAPNP_LITE
96
    static constexpr ::capnp::_::RawBrandedSchema const* brand() { return &schema->defaultBrand; }
97 98
    #endif  // !CAPNP_LITE
  };
99
};
100 101

// =======================================================================================
102 103 104 105 106 107 108 109

class Token::Reader {
public:
  typedef Token Reads;

  Reader() = default;
  inline explicit Reader(::capnp::_::StructReader base): _reader(base) {}

110 111
  inline ::capnp::MessageSize totalSize() const {
    return _reader.totalSize().asPublic();
112 113
  }

114
#if !CAPNP_LITE
115
  inline ::kj::StringTree toString() const {
116
    return ::capnp::_::structString(_reader, *_capnpPrivate::brand());
117
  }
118
#endif  // !CAPNP_LITE
119

120
  inline Which which() const;
121
  inline bool isIdentifier() const;
122 123 124
  inline bool hasIdentifier() const;
  inline  ::capnp::Text::Reader getIdentifier() const;

125
  inline bool isStringLiteral() const;
126 127 128
  inline bool hasStringLiteral() const;
  inline  ::capnp::Text::Reader getStringLiteral() const;

129
  inline bool isIntegerLiteral() const;
130 131
  inline  ::uint64_t getIntegerLiteral() const;

132
  inline bool isFloatLiteral() const;
133 134
  inline double getFloatLiteral() const;

135
  inline bool isOperator() const;
136 137 138
  inline bool hasOperator() const;
  inline  ::capnp::Text::Reader getOperator() const;

139
  inline bool isParenthesizedList() const;
140 141 142
  inline bool hasParenthesizedList() const;
  inline  ::capnp::List< ::capnp::List< ::capnp::compiler::Token>>::Reader getParenthesizedList() const;

143
  inline bool isBracketedList() const;
144 145
  inline bool hasBracketedList() const;
  inline  ::capnp::List< ::capnp::List< ::capnp::compiler::Token>>::Reader getBracketedList() const;
146

147 148 149 150
  inline  ::uint32_t getStartByte() const;

  inline  ::uint32_t getEndByte() const;

Jason Choy's avatar
Jason Choy committed
151 152 153 154
  inline bool isBinaryLiteral() const;
  inline bool hasBinaryLiteral() const;
  inline  ::capnp::Data::Reader getBinaryLiteral() const;

155 156
private:
  ::capnp::_::StructReader _reader;
157
  template <typename, ::capnp::Kind>
158
  friend struct ::capnp::ToDynamic_;
159
  template <typename, ::capnp::Kind>
160
  friend struct ::capnp::_::PointerHelpers;
161
  template <typename, ::capnp::Kind>
162 163 164 165 166
  friend struct ::capnp::List;
  friend class ::capnp::MessageBuilder;
  friend class ::capnp::Orphanage;
};

167
class Token::Builder {
168
public:
169
  typedef Token Builds;
170

171 172 173
  Builder() = delete;  // Deleted to discourage incorrect usage.
                       // You can explicitly initialize to nullptr instead.
  inline Builder(decltype(nullptr)) {}
174 175 176 177
  inline explicit Builder(::capnp::_::StructBuilder base): _builder(base) {}
  inline operator Reader() const { return Reader(_builder.asReader()); }
  inline Reader asReader() const { return *this; }

178
  inline ::capnp::MessageSize totalSize() const { return asReader().totalSize(); }
179
#if !CAPNP_LITE
180
  inline ::kj::StringTree toString() const { return asReader().toString(); }
181
#endif  // !CAPNP_LITE
182

183
  inline Which which();
184
  inline bool isIdentifier();
185 186
  inline bool hasIdentifier();
  inline  ::capnp::Text::Builder getIdentifier();
187
  inline void setIdentifier( ::capnp::Text::Reader value);
188 189 190 191
  inline  ::capnp::Text::Builder initIdentifier(unsigned int size);
  inline void adoptIdentifier(::capnp::Orphan< ::capnp::Text>&& value);
  inline ::capnp::Orphan< ::capnp::Text> disownIdentifier();

192
  inline bool isStringLiteral();
193 194
  inline bool hasStringLiteral();
  inline  ::capnp::Text::Builder getStringLiteral();
195
  inline void setStringLiteral( ::capnp::Text::Reader value);
196 197 198 199
  inline  ::capnp::Text::Builder initStringLiteral(unsigned int size);
  inline void adoptStringLiteral(::capnp::Orphan< ::capnp::Text>&& value);
  inline ::capnp::Orphan< ::capnp::Text> disownStringLiteral();

200
  inline bool isIntegerLiteral();
201 202 203
  inline  ::uint64_t getIntegerLiteral();
  inline void setIntegerLiteral( ::uint64_t value);

204
  inline bool isFloatLiteral();
205 206 207
  inline double getFloatLiteral();
  inline void setFloatLiteral(double value);

208
  inline bool isOperator();
209 210
  inline bool hasOperator();
  inline  ::capnp::Text::Builder getOperator();
211
  inline void setOperator( ::capnp::Text::Reader value);
212 213 214 215
  inline  ::capnp::Text::Builder initOperator(unsigned int size);
  inline void adoptOperator(::capnp::Orphan< ::capnp::Text>&& value);
  inline ::capnp::Orphan< ::capnp::Text> disownOperator();

216
  inline bool isParenthesizedList();
217 218
  inline bool hasParenthesizedList();
  inline  ::capnp::List< ::capnp::List< ::capnp::compiler::Token>>::Builder getParenthesizedList();
219
  inline void setParenthesizedList( ::capnp::List< ::capnp::List< ::capnp::compiler::Token>>::Reader value);
220
  inline void setParenthesizedList(::kj::ArrayPtr<const  ::capnp::List< ::capnp::compiler::Token>::Reader> value);
221 222 223 224
  inline  ::capnp::List< ::capnp::List< ::capnp::compiler::Token>>::Builder initParenthesizedList(unsigned int size);
  inline void adoptParenthesizedList(::capnp::Orphan< ::capnp::List< ::capnp::List< ::capnp::compiler::Token>>>&& value);
  inline ::capnp::Orphan< ::capnp::List< ::capnp::List< ::capnp::compiler::Token>>> disownParenthesizedList();

225
  inline bool isBracketedList();
226 227
  inline bool hasBracketedList();
  inline  ::capnp::List< ::capnp::List< ::capnp::compiler::Token>>::Builder getBracketedList();
228
  inline void setBracketedList( ::capnp::List< ::capnp::List< ::capnp::compiler::Token>>::Reader value);
229
  inline void setBracketedList(::kj::ArrayPtr<const  ::capnp::List< ::capnp::compiler::Token>::Reader> value);
230 231 232
  inline  ::capnp::List< ::capnp::List< ::capnp::compiler::Token>>::Builder initBracketedList(unsigned int size);
  inline void adoptBracketedList(::capnp::Orphan< ::capnp::List< ::capnp::List< ::capnp::compiler::Token>>>&& value);
  inline ::capnp::Orphan< ::capnp::List< ::capnp::List< ::capnp::compiler::Token>>> disownBracketedList();
233

234 235 236 237 238 239
  inline  ::uint32_t getStartByte();
  inline void setStartByte( ::uint32_t value);

  inline  ::uint32_t getEndByte();
  inline void setEndByte( ::uint32_t value);

Jason Choy's avatar
Jason Choy committed
240 241 242 243 244 245 246 247
  inline bool isBinaryLiteral();
  inline bool hasBinaryLiteral();
  inline  ::capnp::Data::Builder getBinaryLiteral();
  inline void setBinaryLiteral( ::capnp::Data::Reader value);
  inline  ::capnp::Data::Builder initBinaryLiteral(unsigned int size);
  inline void adoptBinaryLiteral(::capnp::Orphan< ::capnp::Data>&& value);
  inline ::capnp::Orphan< ::capnp::Data> disownBinaryLiteral();

248 249
private:
  ::capnp::_::StructBuilder _builder;
250
  template <typename, ::capnp::Kind>
251 252
  friend struct ::capnp::ToDynamic_;
  friend class ::capnp::Orphanage;
253 254
  template <typename, ::capnp::Kind>
  friend struct ::capnp::_::PointerHelpers;
255 256
};

257
#if !CAPNP_LITE
258 259 260 261
class Token::Pipeline {
public:
  typedef Token Pipelines;

262
  inline Pipeline(decltype(nullptr)): _typeless(nullptr) {}
263
  inline explicit Pipeline(::capnp::AnyPointer::Pipeline&& typeless)
264 265 266
      : _typeless(kj::mv(typeless)) {}

private:
267
  ::capnp::AnyPointer::Pipeline _typeless;
268
  friend class ::capnp::PipelineHook;
269
  template <typename, ::capnp::Kind>
270 271
  friend struct ::capnp::ToDynamic_;
};
272
#endif  // !CAPNP_LITE
273

274 275 276 277 278 279 280
class Statement::Reader {
public:
  typedef Statement Reads;

  Reader() = default;
  inline explicit Reader(::capnp::_::StructReader base): _reader(base) {}

281 282
  inline ::capnp::MessageSize totalSize() const {
    return _reader.totalSize().asPublic();
283 284
  }

285
#if !CAPNP_LITE
286
  inline ::kj::StringTree toString() const {
287
    return ::capnp::_::structString(_reader, *_capnpPrivate::brand());
288
  }
289
#endif  // !CAPNP_LITE
290

291
  inline Which which() const;
292 293 294
  inline bool hasTokens() const;
  inline  ::capnp::List< ::capnp::compiler::Token>::Reader getTokens() const;

295 296 297 298
  inline bool isLine() const;
  inline  ::capnp::Void getLine() const;

  inline bool isBlock() const;
299
  inline bool hasBlock() const;
300
  inline  ::capnp::List< ::capnp::compiler::Statement>::Reader getBlock() const;
301

302 303 304 305 306 307
  inline bool hasDocComment() const;
  inline  ::capnp::Text::Reader getDocComment() const;

  inline  ::uint32_t getStartByte() const;

  inline  ::uint32_t getEndByte() const;
308

309 310
private:
  ::capnp::_::StructReader _reader;
311
  template <typename, ::capnp::Kind>
312
  friend struct ::capnp::ToDynamic_;
313
  template <typename, ::capnp::Kind>
314
  friend struct ::capnp::_::PointerHelpers;
315
  template <typename, ::capnp::Kind>
316 317 318 319 320 321 322 323 324
  friend struct ::capnp::List;
  friend class ::capnp::MessageBuilder;
  friend class ::capnp::Orphanage;
};

class Statement::Builder {
public:
  typedef Statement Builds;

325 326 327
  Builder() = delete;  // Deleted to discourage incorrect usage.
                       // You can explicitly initialize to nullptr instead.
  inline Builder(decltype(nullptr)) {}
328 329 330 331
  inline explicit Builder(::capnp::_::StructBuilder base): _builder(base) {}
  inline operator Reader() const { return Reader(_builder.asReader()); }
  inline Reader asReader() const { return *this; }

332
  inline ::capnp::MessageSize totalSize() const { return asReader().totalSize(); }
333
#if !CAPNP_LITE
334
  inline ::kj::StringTree toString() const { return asReader().toString(); }
335
#endif  // !CAPNP_LITE
336

337
  inline Which which();
338 339
  inline bool hasTokens();
  inline  ::capnp::List< ::capnp::compiler::Token>::Builder getTokens();
340
  inline void setTokens( ::capnp::List< ::capnp::compiler::Token>::Reader value);
341 342 343 344
  inline  ::capnp::List< ::capnp::compiler::Token>::Builder initTokens(unsigned int size);
  inline void adoptTokens(::capnp::Orphan< ::capnp::List< ::capnp::compiler::Token>>&& value);
  inline ::capnp::Orphan< ::capnp::List< ::capnp::compiler::Token>> disownTokens();

345 346
  inline bool isLine();
  inline  ::capnp::Void getLine();
347
  inline void setLine( ::capnp::Void value = ::capnp::VOID);
348 349

  inline bool isBlock();
350
  inline bool hasBlock();
351 352 353 354 355
  inline  ::capnp::List< ::capnp::compiler::Statement>::Builder getBlock();
  inline void setBlock( ::capnp::List< ::capnp::compiler::Statement>::Reader value);
  inline  ::capnp::List< ::capnp::compiler::Statement>::Builder initBlock(unsigned int size);
  inline void adoptBlock(::capnp::Orphan< ::capnp::List< ::capnp::compiler::Statement>>&& value);
  inline ::capnp::Orphan< ::capnp::List< ::capnp::compiler::Statement>> disownBlock();
356

357 358
  inline bool hasDocComment();
  inline  ::capnp::Text::Builder getDocComment();
359
  inline void setDocComment( ::capnp::Text::Reader value);
360 361 362 363 364 365 366 367 368
  inline  ::capnp::Text::Builder initDocComment(unsigned int size);
  inline void adoptDocComment(::capnp::Orphan< ::capnp::Text>&& value);
  inline ::capnp::Orphan< ::capnp::Text> disownDocComment();

  inline  ::uint32_t getStartByte();
  inline void setStartByte( ::uint32_t value);

  inline  ::uint32_t getEndByte();
  inline void setEndByte( ::uint32_t value);
369

370 371
private:
  ::capnp::_::StructBuilder _builder;
372
  template <typename, ::capnp::Kind>
373 374
  friend struct ::capnp::ToDynamic_;
  friend class ::capnp::Orphanage;
375 376
  template <typename, ::capnp::Kind>
  friend struct ::capnp::_::PointerHelpers;
377 378
};

379
#if !CAPNP_LITE
380 381 382 383
class Statement::Pipeline {
public:
  typedef Statement Pipelines;

384
  inline Pipeline(decltype(nullptr)): _typeless(nullptr) {}
385
  inline explicit Pipeline(::capnp::AnyPointer::Pipeline&& typeless)
386 387 388
      : _typeless(kj::mv(typeless)) {}

private:
389
  ::capnp::AnyPointer::Pipeline _typeless;
390
  friend class ::capnp::PipelineHook;
391
  template <typename, ::capnp::Kind>
392 393
  friend struct ::capnp::ToDynamic_;
};
394
#endif  // !CAPNP_LITE
395

396 397 398 399 400 401 402
class LexedTokens::Reader {
public:
  typedef LexedTokens Reads;

  Reader() = default;
  inline explicit Reader(::capnp::_::StructReader base): _reader(base) {}

403 404
  inline ::capnp::MessageSize totalSize() const {
    return _reader.totalSize().asPublic();
405 406
  }

407
#if !CAPNP_LITE
408
  inline ::kj::StringTree toString() const {
409
    return ::capnp::_::structString(_reader, *_capnpPrivate::brand());
410
  }
411
#endif  // !CAPNP_LITE
412

413 414
  inline bool hasTokens() const;
  inline  ::capnp::List< ::capnp::compiler::Token>::Reader getTokens() const;
415

416 417
private:
  ::capnp::_::StructReader _reader;
418
  template <typename, ::capnp::Kind>
419
  friend struct ::capnp::ToDynamic_;
420
  template <typename, ::capnp::Kind>
421
  friend struct ::capnp::_::PointerHelpers;
422
  template <typename, ::capnp::Kind>
423 424 425 426 427 428 429 430 431
  friend struct ::capnp::List;
  friend class ::capnp::MessageBuilder;
  friend class ::capnp::Orphanage;
};

class LexedTokens::Builder {
public:
  typedef LexedTokens Builds;

432 433 434
  Builder() = delete;  // Deleted to discourage incorrect usage.
                       // You can explicitly initialize to nullptr instead.
  inline Builder(decltype(nullptr)) {}
435 436 437 438
  inline explicit Builder(::capnp::_::StructBuilder base): _builder(base) {}
  inline operator Reader() const { return Reader(_builder.asReader()); }
  inline Reader asReader() const { return *this; }

439
  inline ::capnp::MessageSize totalSize() const { return asReader().totalSize(); }
440
#if !CAPNP_LITE
441
  inline ::kj::StringTree toString() const { return asReader().toString(); }
442
#endif  // !CAPNP_LITE
443 444 445

  inline bool hasTokens();
  inline  ::capnp::List< ::capnp::compiler::Token>::Builder getTokens();
446
  inline void setTokens( ::capnp::List< ::capnp::compiler::Token>::Reader value);
447 448 449
  inline  ::capnp::List< ::capnp::compiler::Token>::Builder initTokens(unsigned int size);
  inline void adoptTokens(::capnp::Orphan< ::capnp::List< ::capnp::compiler::Token>>&& value);
  inline ::capnp::Orphan< ::capnp::List< ::capnp::compiler::Token>> disownTokens();
450

451 452
private:
  ::capnp::_::StructBuilder _builder;
453
  template <typename, ::capnp::Kind>
454 455
  friend struct ::capnp::ToDynamic_;
  friend class ::capnp::Orphanage;
456 457
  template <typename, ::capnp::Kind>
  friend struct ::capnp::_::PointerHelpers;
458 459
};

460
#if !CAPNP_LITE
461 462 463 464
class LexedTokens::Pipeline {
public:
  typedef LexedTokens Pipelines;

465
  inline Pipeline(decltype(nullptr)): _typeless(nullptr) {}
466
  inline explicit Pipeline(::capnp::AnyPointer::Pipeline&& typeless)
467 468 469
      : _typeless(kj::mv(typeless)) {}

private:
470
  ::capnp::AnyPointer::Pipeline _typeless;
471
  friend class ::capnp::PipelineHook;
472
  template <typename, ::capnp::Kind>
473 474
  friend struct ::capnp::ToDynamic_;
};
475
#endif  // !CAPNP_LITE
476

477 478 479 480 481 482 483
class LexedStatements::Reader {
public:
  typedef LexedStatements Reads;

  Reader() = default;
  inline explicit Reader(::capnp::_::StructReader base): _reader(base) {}

484 485
  inline ::capnp::MessageSize totalSize() const {
    return _reader.totalSize().asPublic();
486 487
  }

488
#if !CAPNP_LITE
489
  inline ::kj::StringTree toString() const {
490
    return ::capnp::_::structString(_reader, *_capnpPrivate::brand());
491
  }
492
#endif  // !CAPNP_LITE
493

494 495
  inline bool hasStatements() const;
  inline  ::capnp::List< ::capnp::compiler::Statement>::Reader getStatements() const;
496

497 498
private:
  ::capnp::_::StructReader _reader;
499
  template <typename, ::capnp::Kind>
500
  friend struct ::capnp::ToDynamic_;
501
  template <typename, ::capnp::Kind>
502
  friend struct ::capnp::_::PointerHelpers;
503
  template <typename, ::capnp::Kind>
504 505 506 507 508 509 510 511 512
  friend struct ::capnp::List;
  friend class ::capnp::MessageBuilder;
  friend class ::capnp::Orphanage;
};

class LexedStatements::Builder {
public:
  typedef LexedStatements Builds;

513 514 515
  Builder() = delete;  // Deleted to discourage incorrect usage.
                       // You can explicitly initialize to nullptr instead.
  inline Builder(decltype(nullptr)) {}
516 517 518 519
  inline explicit Builder(::capnp::_::StructBuilder base): _builder(base) {}
  inline operator Reader() const { return Reader(_builder.asReader()); }
  inline Reader asReader() const { return *this; }

520
  inline ::capnp::MessageSize totalSize() const { return asReader().totalSize(); }
521
#if !CAPNP_LITE
522
  inline ::kj::StringTree toString() const { return asReader().toString(); }
523
#endif  // !CAPNP_LITE
524 525 526

  inline bool hasStatements();
  inline  ::capnp::List< ::capnp::compiler::Statement>::Builder getStatements();
527
  inline void setStatements( ::capnp::List< ::capnp::compiler::Statement>::Reader value);
528 529 530
  inline  ::capnp::List< ::capnp::compiler::Statement>::Builder initStatements(unsigned int size);
  inline void adoptStatements(::capnp::Orphan< ::capnp::List< ::capnp::compiler::Statement>>&& value);
  inline ::capnp::Orphan< ::capnp::List< ::capnp::compiler::Statement>> disownStatements();
531

532 533
private:
  ::capnp::_::StructBuilder _builder;
534
  template <typename, ::capnp::Kind>
535 536
  friend struct ::capnp::ToDynamic_;
  friend class ::capnp::Orphanage;
537 538
  template <typename, ::capnp::Kind>
  friend struct ::capnp::_::PointerHelpers;
539 540
};

541
#if !CAPNP_LITE
542 543 544 545
class LexedStatements::Pipeline {
public:
  typedef LexedStatements Pipelines;

546
  inline Pipeline(decltype(nullptr)): _typeless(nullptr) {}
547
  inline explicit Pipeline(::capnp::AnyPointer::Pipeline&& typeless)
548 549 550
      : _typeless(kj::mv(typeless)) {}

private:
551
  ::capnp::AnyPointer::Pipeline _typeless;
552
  friend class ::capnp::PipelineHook;
553
  template <typename, ::capnp::Kind>
554 555
  friend struct ::capnp::ToDynamic_;
};
556
#endif  // !CAPNP_LITE
557

558
// =======================================================================================
559

560
inline  ::capnp::compiler::Token::Which Token::Reader::which() const {
561
  return _reader.getDataField<Which>(
562
      ::capnp::bounded<0>() * ::capnp::ELEMENTS);
563
}
564
inline  ::capnp::compiler::Token::Which Token::Builder::which() {
565
  return _builder.getDataField<Which>(
566
      ::capnp::bounded<0>() * ::capnp::ELEMENTS);
567 568
}

569 570 571 572 573 574
inline bool Token::Reader::isIdentifier() const {
  return which() == Token::IDENTIFIER;
}
inline bool Token::Builder::isIdentifier() {
  return which() == Token::IDENTIFIER;
}
575
inline bool Token::Reader::hasIdentifier() const {
576
  if (which() != Token::IDENTIFIER) return false;
577
  return !_reader.getPointerField(
578
      ::capnp::bounded<0>() * ::capnp::POINTERS).isNull();
579
}
580
inline bool Token::Builder::hasIdentifier() {
581
  if (which() != Token::IDENTIFIER) return false;
582
  return !_builder.getPointerField(
583
      ::capnp::bounded<0>() * ::capnp::POINTERS).isNull();
584
}
585
inline  ::capnp::Text::Reader Token::Reader::getIdentifier() const {
586
  KJ_IREQUIRE((which() == Token::IDENTIFIER),
587
              "Must check which() before get()ing a union member.");
588
  return ::capnp::_::PointerHelpers< ::capnp::Text>::get(_reader.getPointerField(
589
      ::capnp::bounded<0>() * ::capnp::POINTERS));
590
}
591
inline  ::capnp::Text::Builder Token::Builder::getIdentifier() {
592
  KJ_IREQUIRE((which() == Token::IDENTIFIER),
593
              "Must check which() before get()ing a union member.");
594
  return ::capnp::_::PointerHelpers< ::capnp::Text>::get(_builder.getPointerField(
595
      ::capnp::bounded<0>() * ::capnp::POINTERS));
596
}
597 598
inline void Token::Builder::setIdentifier( ::capnp::Text::Reader value) {
  _builder.setDataField<Token::Which>(
599
      ::capnp::bounded<0>() * ::capnp::ELEMENTS, Token::IDENTIFIER);
600
  ::capnp::_::PointerHelpers< ::capnp::Text>::set(_builder.getPointerField(
601
      ::capnp::bounded<0>() * ::capnp::POINTERS), value);
602
}
603 604
inline  ::capnp::Text::Builder Token::Builder::initIdentifier(unsigned int size) {
  _builder.setDataField<Token::Which>(
605
      ::capnp::bounded<0>() * ::capnp::ELEMENTS, Token::IDENTIFIER);
606
  return ::capnp::_::PointerHelpers< ::capnp::Text>::init(_builder.getPointerField(
607
      ::capnp::bounded<0>() * ::capnp::POINTERS), size);
608
}
609
inline void Token::Builder::adoptIdentifier(
610
    ::capnp::Orphan< ::capnp::Text>&& value) {
611
  _builder.setDataField<Token::Which>(
612
      ::capnp::bounded<0>() * ::capnp::ELEMENTS, Token::IDENTIFIER);
613
  ::capnp::_::PointerHelpers< ::capnp::Text>::adopt(_builder.getPointerField(
614
      ::capnp::bounded<0>() * ::capnp::POINTERS), kj::mv(value));
615
}
616
inline ::capnp::Orphan< ::capnp::Text> Token::Builder::disownIdentifier() {
617
  KJ_IREQUIRE((which() == Token::IDENTIFIER),
618
              "Must check which() before get()ing a union member.");
619
  return ::capnp::_::PointerHelpers< ::capnp::Text>::disown(_builder.getPointerField(
620
      ::capnp::bounded<0>() * ::capnp::POINTERS));
621 622
}

623 624 625 626 627 628
inline bool Token::Reader::isStringLiteral() const {
  return which() == Token::STRING_LITERAL;
}
inline bool Token::Builder::isStringLiteral() {
  return which() == Token::STRING_LITERAL;
}
629
inline bool Token::Reader::hasStringLiteral() const {
630
  if (which() != Token::STRING_LITERAL) return false;
631
  return !_reader.getPointerField(
632
      ::capnp::bounded<0>() * ::capnp::POINTERS).isNull();
633
}
634
inline bool Token::Builder::hasStringLiteral() {
635
  if (which() != Token::STRING_LITERAL) return false;
636
  return !_builder.getPointerField(
637
      ::capnp::bounded<0>() * ::capnp::POINTERS).isNull();
638
}
639
inline  ::capnp::Text::Reader Token::Reader::getStringLiteral() const {
640
  KJ_IREQUIRE((which() == Token::STRING_LITERAL),
641
              "Must check which() before get()ing a union member.");
642
  return ::capnp::_::PointerHelpers< ::capnp::Text>::get(_reader.getPointerField(
643
      ::capnp::bounded<0>() * ::capnp::POINTERS));
644
}
645
inline  ::capnp::Text::Builder Token::Builder::getStringLiteral() {
646
  KJ_IREQUIRE((which() == Token::STRING_LITERAL),
647
              "Must check which() before get()ing a union member.");
648
  return ::capnp::_::PointerHelpers< ::capnp::Text>::get(_builder.getPointerField(
649
      ::capnp::bounded<0>() * ::capnp::POINTERS));
650
}
651 652
inline void Token::Builder::setStringLiteral( ::capnp::Text::Reader value) {
  _builder.setDataField<Token::Which>(
653
      ::capnp::bounded<0>() * ::capnp::ELEMENTS, Token::STRING_LITERAL);
654
  ::capnp::_::PointerHelpers< ::capnp::Text>::set(_builder.getPointerField(
655
      ::capnp::bounded<0>() * ::capnp::POINTERS), value);
656
}
657 658
inline  ::capnp::Text::Builder Token::Builder::initStringLiteral(unsigned int size) {
  _builder.setDataField<Token::Which>(
659
      ::capnp::bounded<0>() * ::capnp::ELEMENTS, Token::STRING_LITERAL);
660
  return ::capnp::_::PointerHelpers< ::capnp::Text>::init(_builder.getPointerField(
661
      ::capnp::bounded<0>() * ::capnp::POINTERS), size);
662
}
663
inline void Token::Builder::adoptStringLiteral(
664
    ::capnp::Orphan< ::capnp::Text>&& value) {
665
  _builder.setDataField<Token::Which>(
666
      ::capnp::bounded<0>() * ::capnp::ELEMENTS, Token::STRING_LITERAL);
667
  ::capnp::_::PointerHelpers< ::capnp::Text>::adopt(_builder.getPointerField(
668
      ::capnp::bounded<0>() * ::capnp::POINTERS), kj::mv(value));
669
}
670
inline ::capnp::Orphan< ::capnp::Text> Token::Builder::disownStringLiteral() {
671
  KJ_IREQUIRE((which() == Token::STRING_LITERAL),
672
              "Must check which() before get()ing a union member.");
673
  return ::capnp::_::PointerHelpers< ::capnp::Text>::disown(_builder.getPointerField(
674
      ::capnp::bounded<0>() * ::capnp::POINTERS));
675 676
}

677 678 679 680 681 682
inline bool Token::Reader::isIntegerLiteral() const {
  return which() == Token::INTEGER_LITERAL;
}
inline bool Token::Builder::isIntegerLiteral() {
  return which() == Token::INTEGER_LITERAL;
}
683
inline  ::uint64_t Token::Reader::getIntegerLiteral() const {
684
  KJ_IREQUIRE((which() == Token::INTEGER_LITERAL),
685 686
              "Must check which() before get()ing a union member.");
  return _reader.getDataField< ::uint64_t>(
687
      ::capnp::bounded<1>() * ::capnp::ELEMENTS);
688 689
}

690
inline  ::uint64_t Token::Builder::getIntegerLiteral() {
691
  KJ_IREQUIRE((which() == Token::INTEGER_LITERAL),
692 693
              "Must check which() before get()ing a union member.");
  return _builder.getDataField< ::uint64_t>(
694
      ::capnp::bounded<1>() * ::capnp::ELEMENTS);
695
}
696 697
inline void Token::Builder::setIntegerLiteral( ::uint64_t value) {
  _builder.setDataField<Token::Which>(
698
      ::capnp::bounded<0>() * ::capnp::ELEMENTS, Token::INTEGER_LITERAL);
699
  _builder.setDataField< ::uint64_t>(
700
      ::capnp::bounded<1>() * ::capnp::ELEMENTS, value);
701 702
}

703 704 705 706 707 708
inline bool Token::Reader::isFloatLiteral() const {
  return which() == Token::FLOAT_LITERAL;
}
inline bool Token::Builder::isFloatLiteral() {
  return which() == Token::FLOAT_LITERAL;
}
709
inline double Token::Reader::getFloatLiteral() const {
710
  KJ_IREQUIRE((which() == Token::FLOAT_LITERAL),
711 712
              "Must check which() before get()ing a union member.");
  return _reader.getDataField<double>(
713
      ::capnp::bounded<1>() * ::capnp::ELEMENTS);
714 715
}

716
inline double Token::Builder::getFloatLiteral() {
717
  KJ_IREQUIRE((which() == Token::FLOAT_LITERAL),
718 719
              "Must check which() before get()ing a union member.");
  return _builder.getDataField<double>(
720
      ::capnp::bounded<1>() * ::capnp::ELEMENTS);
721
}
722 723
inline void Token::Builder::setFloatLiteral(double value) {
  _builder.setDataField<Token::Which>(
724
      ::capnp::bounded<0>() * ::capnp::ELEMENTS, Token::FLOAT_LITERAL);
725
  _builder.setDataField<double>(
726
      ::capnp::bounded<1>() * ::capnp::ELEMENTS, value);
727 728
}

729 730 731 732 733 734
inline bool Token::Reader::isOperator() const {
  return which() == Token::OPERATOR;
}
inline bool Token::Builder::isOperator() {
  return which() == Token::OPERATOR;
}
735
inline bool Token::Reader::hasOperator() const {
736
  if (which() != Token::OPERATOR) return false;
737
  return !_reader.getPointerField(
738
      ::capnp::bounded<0>() * ::capnp::POINTERS).isNull();
739
}
740
inline bool Token::Builder::hasOperator() {
741
  if (which() != Token::OPERATOR) return false;
742
  return !_builder.getPointerField(
743
      ::capnp::bounded<0>() * ::capnp::POINTERS).isNull();
744
}
745
inline  ::capnp::Text::Reader Token::Reader::getOperator() const {
746
  KJ_IREQUIRE((which() == Token::OPERATOR),
747
              "Must check which() before get()ing a union member.");
748
  return ::capnp::_::PointerHelpers< ::capnp::Text>::get(_reader.getPointerField(
749
      ::capnp::bounded<0>() * ::capnp::POINTERS));
750
}
751
inline  ::capnp::Text::Builder Token::Builder::getOperator() {
752
  KJ_IREQUIRE((which() == Token::OPERATOR),
753
              "Must check which() before get()ing a union member.");
754
  return ::capnp::_::PointerHelpers< ::capnp::Text>::get(_builder.getPointerField(
755
      ::capnp::bounded<0>() * ::capnp::POINTERS));
756
}
757 758
inline void Token::Builder::setOperator( ::capnp::Text::Reader value) {
  _builder.setDataField<Token::Which>(
759
      ::capnp::bounded<0>() * ::capnp::ELEMENTS, Token::OPERATOR);
760
  ::capnp::_::PointerHelpers< ::capnp::Text>::set(_builder.getPointerField(
761
      ::capnp::bounded<0>() * ::capnp::POINTERS), value);
762
}
763 764
inline  ::capnp::Text::Builder Token::Builder::initOperator(unsigned int size) {
  _builder.setDataField<Token::Which>(
765
      ::capnp::bounded<0>() * ::capnp::ELEMENTS, Token::OPERATOR);
766
  return ::capnp::_::PointerHelpers< ::capnp::Text>::init(_builder.getPointerField(
767
      ::capnp::bounded<0>() * ::capnp::POINTERS), size);
768
}
769
inline void Token::Builder::adoptOperator(
770
    ::capnp::Orphan< ::capnp::Text>&& value) {
771
  _builder.setDataField<Token::Which>(
772
      ::capnp::bounded<0>() * ::capnp::ELEMENTS, Token::OPERATOR);
773
  ::capnp::_::PointerHelpers< ::capnp::Text>::adopt(_builder.getPointerField(
774
      ::capnp::bounded<0>() * ::capnp::POINTERS), kj::mv(value));
775
}
776
inline ::capnp::Orphan< ::capnp::Text> Token::Builder::disownOperator() {
777
  KJ_IREQUIRE((which() == Token::OPERATOR),
778
              "Must check which() before get()ing a union member.");
779
  return ::capnp::_::PointerHelpers< ::capnp::Text>::disown(_builder.getPointerField(
780
      ::capnp::bounded<0>() * ::capnp::POINTERS));
781 782
}

783 784 785 786 787 788
inline bool Token::Reader::isParenthesizedList() const {
  return which() == Token::PARENTHESIZED_LIST;
}
inline bool Token::Builder::isParenthesizedList() {
  return which() == Token::PARENTHESIZED_LIST;
}
789
inline bool Token::Reader::hasParenthesizedList() const {
790
  if (which() != Token::PARENTHESIZED_LIST) return false;
791
  return !_reader.getPointerField(
792
      ::capnp::bounded<0>() * ::capnp::POINTERS).isNull();
793
}
794
inline bool Token::Builder::hasParenthesizedList() {
795
  if (which() != Token::PARENTHESIZED_LIST) return false;
796
  return !_builder.getPointerField(
797
      ::capnp::bounded<0>() * ::capnp::POINTERS).isNull();
798
}
799
inline  ::capnp::List< ::capnp::List< ::capnp::compiler::Token>>::Reader Token::Reader::getParenthesizedList() const {
800
  KJ_IREQUIRE((which() == Token::PARENTHESIZED_LIST),
801
              "Must check which() before get()ing a union member.");
802
  return ::capnp::_::PointerHelpers< ::capnp::List< ::capnp::List< ::capnp::compiler::Token>>>::get(_reader.getPointerField(
803
      ::capnp::bounded<0>() * ::capnp::POINTERS));
804
}
805
inline  ::capnp::List< ::capnp::List< ::capnp::compiler::Token>>::Builder Token::Builder::getParenthesizedList() {
806
  KJ_IREQUIRE((which() == Token::PARENTHESIZED_LIST),
807
              "Must check which() before get()ing a union member.");
808
  return ::capnp::_::PointerHelpers< ::capnp::List< ::capnp::List< ::capnp::compiler::Token>>>::get(_builder.getPointerField(
809
      ::capnp::bounded<0>() * ::capnp::POINTERS));
810
}
811 812
inline void Token::Builder::setParenthesizedList( ::capnp::List< ::capnp::List< ::capnp::compiler::Token>>::Reader value) {
  _builder.setDataField<Token::Which>(
813
      ::capnp::bounded<0>() * ::capnp::ELEMENTS, Token::PARENTHESIZED_LIST);
814
  ::capnp::_::PointerHelpers< ::capnp::List< ::capnp::List< ::capnp::compiler::Token>>>::set(_builder.getPointerField(
815
      ::capnp::bounded<0>() * ::capnp::POINTERS), value);
816
}
817
inline void Token::Builder::setParenthesizedList(::kj::ArrayPtr<const  ::capnp::List< ::capnp::compiler::Token>::Reader> value) {
818
  _builder.setDataField<Token::Which>(
819
      ::capnp::bounded<0>() * ::capnp::ELEMENTS, Token::PARENTHESIZED_LIST);
820
  ::capnp::_::PointerHelpers< ::capnp::List< ::capnp::List< ::capnp::compiler::Token>>>::set(_builder.getPointerField(
821
      ::capnp::bounded<0>() * ::capnp::POINTERS), value);
822
}
823 824
inline  ::capnp::List< ::capnp::List< ::capnp::compiler::Token>>::Builder Token::Builder::initParenthesizedList(unsigned int size) {
  _builder.setDataField<Token::Which>(
825
      ::capnp::bounded<0>() * ::capnp::ELEMENTS, Token::PARENTHESIZED_LIST);
826
  return ::capnp::_::PointerHelpers< ::capnp::List< ::capnp::List< ::capnp::compiler::Token>>>::init(_builder.getPointerField(
827
      ::capnp::bounded<0>() * ::capnp::POINTERS), size);
828
}
829
inline void Token::Builder::adoptParenthesizedList(
830
    ::capnp::Orphan< ::capnp::List< ::capnp::List< ::capnp::compiler::Token>>>&& value) {
831
  _builder.setDataField<Token::Which>(
832
      ::capnp::bounded<0>() * ::capnp::ELEMENTS, Token::PARENTHESIZED_LIST);
833
  ::capnp::_::PointerHelpers< ::capnp::List< ::capnp::List< ::capnp::compiler::Token>>>::adopt(_builder.getPointerField(
834
      ::capnp::bounded<0>() * ::capnp::POINTERS), kj::mv(value));
835
}
836
inline ::capnp::Orphan< ::capnp::List< ::capnp::List< ::capnp::compiler::Token>>> Token::Builder::disownParenthesizedList() {
837
  KJ_IREQUIRE((which() == Token::PARENTHESIZED_LIST),
838
              "Must check which() before get()ing a union member.");
839
  return ::capnp::_::PointerHelpers< ::capnp::List< ::capnp::List< ::capnp::compiler::Token>>>::disown(_builder.getPointerField(
840
      ::capnp::bounded<0>() * ::capnp::POINTERS));
841 842
}

843 844 845 846 847 848
inline bool Token::Reader::isBracketedList() const {
  return which() == Token::BRACKETED_LIST;
}
inline bool Token::Builder::isBracketedList() {
  return which() == Token::BRACKETED_LIST;
}
849
inline bool Token::Reader::hasBracketedList() const {
850
  if (which() != Token::BRACKETED_LIST) return false;
851
  return !_reader.getPointerField(
852
      ::capnp::bounded<0>() * ::capnp::POINTERS).isNull();
853
}
854
inline bool Token::Builder::hasBracketedList() {
855
  if (which() != Token::BRACKETED_LIST) return false;
856
  return !_builder.getPointerField(
857
      ::capnp::bounded<0>() * ::capnp::POINTERS).isNull();
858
}
859
inline  ::capnp::List< ::capnp::List< ::capnp::compiler::Token>>::Reader Token::Reader::getBracketedList() const {
860
  KJ_IREQUIRE((which() == Token::BRACKETED_LIST),
861
              "Must check which() before get()ing a union member.");
862
  return ::capnp::_::PointerHelpers< ::capnp::List< ::capnp::List< ::capnp::compiler::Token>>>::get(_reader.getPointerField(
863
      ::capnp::bounded<0>() * ::capnp::POINTERS));
864
}
865
inline  ::capnp::List< ::capnp::List< ::capnp::compiler::Token>>::Builder Token::Builder::getBracketedList() {
866
  KJ_IREQUIRE((which() == Token::BRACKETED_LIST),
867
              "Must check which() before get()ing a union member.");
868
  return ::capnp::_::PointerHelpers< ::capnp::List< ::capnp::List< ::capnp::compiler::Token>>>::get(_builder.getPointerField(
869
      ::capnp::bounded<0>() * ::capnp::POINTERS));
870
}
871 872
inline void Token::Builder::setBracketedList( ::capnp::List< ::capnp::List< ::capnp::compiler::Token>>::Reader value) {
  _builder.setDataField<Token::Which>(
873
      ::capnp::bounded<0>() * ::capnp::ELEMENTS, Token::BRACKETED_LIST);
874
  ::capnp::_::PointerHelpers< ::capnp::List< ::capnp::List< ::capnp::compiler::Token>>>::set(_builder.getPointerField(
875
      ::capnp::bounded<0>() * ::capnp::POINTERS), value);
876
}
877
inline void Token::Builder::setBracketedList(::kj::ArrayPtr<const  ::capnp::List< ::capnp::compiler::Token>::Reader> value) {
878
  _builder.setDataField<Token::Which>(
879
      ::capnp::bounded<0>() * ::capnp::ELEMENTS, Token::BRACKETED_LIST);
880
  ::capnp::_::PointerHelpers< ::capnp::List< ::capnp::List< ::capnp::compiler::Token>>>::set(_builder.getPointerField(
881
      ::capnp::bounded<0>() * ::capnp::POINTERS), value);
882
}
883 884
inline  ::capnp::List< ::capnp::List< ::capnp::compiler::Token>>::Builder Token::Builder::initBracketedList(unsigned int size) {
  _builder.setDataField<Token::Which>(
885
      ::capnp::bounded<0>() * ::capnp::ELEMENTS, Token::BRACKETED_LIST);
886
  return ::capnp::_::PointerHelpers< ::capnp::List< ::capnp::List< ::capnp::compiler::Token>>>::init(_builder.getPointerField(
887
      ::capnp::bounded<0>() * ::capnp::POINTERS), size);
888
}
889
inline void Token::Builder::adoptBracketedList(
890
    ::capnp::Orphan< ::capnp::List< ::capnp::List< ::capnp::compiler::Token>>>&& value) {
891
  _builder.setDataField<Token::Which>(
892
      ::capnp::bounded<0>() * ::capnp::ELEMENTS, Token::BRACKETED_LIST);
893
  ::capnp::_::PointerHelpers< ::capnp::List< ::capnp::List< ::capnp::compiler::Token>>>::adopt(_builder.getPointerField(
894
      ::capnp::bounded<0>() * ::capnp::POINTERS), kj::mv(value));
895
}
896
inline ::capnp::Orphan< ::capnp::List< ::capnp::List< ::capnp::compiler::Token>>> Token::Builder::disownBracketedList() {
897
  KJ_IREQUIRE((which() == Token::BRACKETED_LIST),
898
              "Must check which() before get()ing a union member.");
899
  return ::capnp::_::PointerHelpers< ::capnp::List< ::capnp::List< ::capnp::compiler::Token>>>::disown(_builder.getPointerField(
900
      ::capnp::bounded<0>() * ::capnp::POINTERS));
901 902
}

903 904
inline  ::uint32_t Token::Reader::getStartByte() const {
  return _reader.getDataField< ::uint32_t>(
905
      ::capnp::bounded<1>() * ::capnp::ELEMENTS);
906 907 908 909
}

inline  ::uint32_t Token::Builder::getStartByte() {
  return _builder.getDataField< ::uint32_t>(
910
      ::capnp::bounded<1>() * ::capnp::ELEMENTS);
911 912 913
}
inline void Token::Builder::setStartByte( ::uint32_t value) {
  _builder.setDataField< ::uint32_t>(
914
      ::capnp::bounded<1>() * ::capnp::ELEMENTS, value);
915 916 917 918
}

inline  ::uint32_t Token::Reader::getEndByte() const {
  return _reader.getDataField< ::uint32_t>(
919
      ::capnp::bounded<4>() * ::capnp::ELEMENTS);
920 921 922 923
}

inline  ::uint32_t Token::Builder::getEndByte() {
  return _builder.getDataField< ::uint32_t>(
924
      ::capnp::bounded<4>() * ::capnp::ELEMENTS);
925 926 927
}
inline void Token::Builder::setEndByte( ::uint32_t value) {
  _builder.setDataField< ::uint32_t>(
928
      ::capnp::bounded<4>() * ::capnp::ELEMENTS, value);
929 930
}

Jason Choy's avatar
Jason Choy committed
931 932 933 934 935 936 937 938
inline bool Token::Reader::isBinaryLiteral() const {
  return which() == Token::BINARY_LITERAL;
}
inline bool Token::Builder::isBinaryLiteral() {
  return which() == Token::BINARY_LITERAL;
}
inline bool Token::Reader::hasBinaryLiteral() const {
  if (which() != Token::BINARY_LITERAL) return false;
939
  return !_reader.getPointerField(
940
      ::capnp::bounded<0>() * ::capnp::POINTERS).isNull();
Jason Choy's avatar
Jason Choy committed
941 942 943
}
inline bool Token::Builder::hasBinaryLiteral() {
  if (which() != Token::BINARY_LITERAL) return false;
944
  return !_builder.getPointerField(
945
      ::capnp::bounded<0>() * ::capnp::POINTERS).isNull();
Jason Choy's avatar
Jason Choy committed
946 947
}
inline  ::capnp::Data::Reader Token::Reader::getBinaryLiteral() const {
948
  KJ_IREQUIRE((which() == Token::BINARY_LITERAL),
Jason Choy's avatar
Jason Choy committed
949
              "Must check which() before get()ing a union member.");
950
  return ::capnp::_::PointerHelpers< ::capnp::Data>::get(_reader.getPointerField(
951
      ::capnp::bounded<0>() * ::capnp::POINTERS));
Jason Choy's avatar
Jason Choy committed
952 953
}
inline  ::capnp::Data::Builder Token::Builder::getBinaryLiteral() {
954
  KJ_IREQUIRE((which() == Token::BINARY_LITERAL),
Jason Choy's avatar
Jason Choy committed
955
              "Must check which() before get()ing a union member.");
956
  return ::capnp::_::PointerHelpers< ::capnp::Data>::get(_builder.getPointerField(
957
      ::capnp::bounded<0>() * ::capnp::POINTERS));
Jason Choy's avatar
Jason Choy committed
958 959 960
}
inline void Token::Builder::setBinaryLiteral( ::capnp::Data::Reader value) {
  _builder.setDataField<Token::Which>(
961
      ::capnp::bounded<0>() * ::capnp::ELEMENTS, Token::BINARY_LITERAL);
962
  ::capnp::_::PointerHelpers< ::capnp::Data>::set(_builder.getPointerField(
963
      ::capnp::bounded<0>() * ::capnp::POINTERS), value);
Jason Choy's avatar
Jason Choy committed
964 965 966
}
inline  ::capnp::Data::Builder Token::Builder::initBinaryLiteral(unsigned int size) {
  _builder.setDataField<Token::Which>(
967
      ::capnp::bounded<0>() * ::capnp::ELEMENTS, Token::BINARY_LITERAL);
968
  return ::capnp::_::PointerHelpers< ::capnp::Data>::init(_builder.getPointerField(
969
      ::capnp::bounded<0>() * ::capnp::POINTERS), size);
Jason Choy's avatar
Jason Choy committed
970 971 972 973
}
inline void Token::Builder::adoptBinaryLiteral(
    ::capnp::Orphan< ::capnp::Data>&& value) {
  _builder.setDataField<Token::Which>(
974
      ::capnp::bounded<0>() * ::capnp::ELEMENTS, Token::BINARY_LITERAL);
975
  ::capnp::_::PointerHelpers< ::capnp::Data>::adopt(_builder.getPointerField(
976
      ::capnp::bounded<0>() * ::capnp::POINTERS), kj::mv(value));
Jason Choy's avatar
Jason Choy committed
977 978
}
inline ::capnp::Orphan< ::capnp::Data> Token::Builder::disownBinaryLiteral() {
979
  KJ_IREQUIRE((which() == Token::BINARY_LITERAL),
Jason Choy's avatar
Jason Choy committed
980
              "Must check which() before get()ing a union member.");
981
  return ::capnp::_::PointerHelpers< ::capnp::Data>::disown(_builder.getPointerField(
982
      ::capnp::bounded<0>() * ::capnp::POINTERS));
Jason Choy's avatar
Jason Choy committed
983 984
}

985
inline  ::capnp::compiler::Statement::Which Statement::Reader::which() const {
986
  return _reader.getDataField<Which>(
987
      ::capnp::bounded<0>() * ::capnp::ELEMENTS);
988
}
989
inline  ::capnp::compiler::Statement::Which Statement::Builder::which() {
990
  return _builder.getDataField<Which>(
991
      ::capnp::bounded<0>() * ::capnp::ELEMENTS);
992 993
}

994
inline bool Statement::Reader::hasTokens() const {
995
  return !_reader.getPointerField(
996
      ::capnp::bounded<0>() * ::capnp::POINTERS).isNull();
997 998
}
inline bool Statement::Builder::hasTokens() {
999
  return !_builder.getPointerField(
1000
      ::capnp::bounded<0>() * ::capnp::POINTERS).isNull();
1001 1002
}
inline  ::capnp::List< ::capnp::compiler::Token>::Reader Statement::Reader::getTokens() const {
1003
  return ::capnp::_::PointerHelpers< ::capnp::List< ::capnp::compiler::Token>>::get(_reader.getPointerField(
1004
      ::capnp::bounded<0>() * ::capnp::POINTERS));
1005 1006
}
inline  ::capnp::List< ::capnp::compiler::Token>::Builder Statement::Builder::getTokens() {
1007
  return ::capnp::_::PointerHelpers< ::capnp::List< ::capnp::compiler::Token>>::get(_builder.getPointerField(
1008
      ::capnp::bounded<0>() * ::capnp::POINTERS));
1009 1010
}
inline void Statement::Builder::setTokens( ::capnp::List< ::capnp::compiler::Token>::Reader value) {
1011
  ::capnp::_::PointerHelpers< ::capnp::List< ::capnp::compiler::Token>>::set(_builder.getPointerField(
1012
      ::capnp::bounded<0>() * ::capnp::POINTERS), value);
1013 1014
}
inline  ::capnp::List< ::capnp::compiler::Token>::Builder Statement::Builder::initTokens(unsigned int size) {
1015
  return ::capnp::_::PointerHelpers< ::capnp::List< ::capnp::compiler::Token>>::init(_builder.getPointerField(
1016
      ::capnp::bounded<0>() * ::capnp::POINTERS), size);
1017 1018 1019
}
inline void Statement::Builder::adoptTokens(
    ::capnp::Orphan< ::capnp::List< ::capnp::compiler::Token>>&& value) {
1020
  ::capnp::_::PointerHelpers< ::capnp::List< ::capnp::compiler::Token>>::adopt(_builder.getPointerField(
1021
      ::capnp::bounded<0>() * ::capnp::POINTERS), kj::mv(value));
1022 1023
}
inline ::capnp::Orphan< ::capnp::List< ::capnp::compiler::Token>> Statement::Builder::disownTokens() {
1024
  return ::capnp::_::PointerHelpers< ::capnp::List< ::capnp::compiler::Token>>::disown(_builder.getPointerField(
1025
      ::capnp::bounded<0>() * ::capnp::POINTERS));
1026 1027
}

1028 1029 1030 1031 1032 1033 1034
inline bool Statement::Reader::isLine() const {
  return which() == Statement::LINE;
}
inline bool Statement::Builder::isLine() {
  return which() == Statement::LINE;
}
inline  ::capnp::Void Statement::Reader::getLine() const {
1035
  KJ_IREQUIRE((which() == Statement::LINE),
1036 1037
              "Must check which() before get()ing a union member.");
  return _reader.getDataField< ::capnp::Void>(
1038
      ::capnp::bounded<0>() * ::capnp::ELEMENTS);
1039 1040 1041
}

inline  ::capnp::Void Statement::Builder::getLine() {
1042
  KJ_IREQUIRE((which() == Statement::LINE),
1043 1044
              "Must check which() before get()ing a union member.");
  return _builder.getDataField< ::capnp::Void>(
1045
      ::capnp::bounded<0>() * ::capnp::ELEMENTS);
1046 1047 1048
}
inline void Statement::Builder::setLine( ::capnp::Void value) {
  _builder.setDataField<Statement::Which>(
1049
      ::capnp::bounded<0>() * ::capnp::ELEMENTS, Statement::LINE);
1050
  _builder.setDataField< ::capnp::Void>(
1051
      ::capnp::bounded<0>() * ::capnp::ELEMENTS, value);
1052 1053 1054 1055 1056 1057 1058 1059
}

inline bool Statement::Reader::isBlock() const {
  return which() == Statement::BLOCK;
}
inline bool Statement::Builder::isBlock() {
  return which() == Statement::BLOCK;
}
1060
inline bool Statement::Reader::hasBlock() const {
1061
  if (which() != Statement::BLOCK) return false;
1062
  return !_reader.getPointerField(
1063
      ::capnp::bounded<1>() * ::capnp::POINTERS).isNull();
1064 1065
}
inline bool Statement::Builder::hasBlock() {
1066
  if (which() != Statement::BLOCK) return false;
1067
  return !_builder.getPointerField(
1068
      ::capnp::bounded<1>() * ::capnp::POINTERS).isNull();
1069 1070
}
inline  ::capnp::List< ::capnp::compiler::Statement>::Reader Statement::Reader::getBlock() const {
1071
  KJ_IREQUIRE((which() == Statement::BLOCK),
1072
              "Must check which() before get()ing a union member.");
1073
  return ::capnp::_::PointerHelpers< ::capnp::List< ::capnp::compiler::Statement>>::get(_reader.getPointerField(
1074
      ::capnp::bounded<1>() * ::capnp::POINTERS));
1075 1076
}
inline  ::capnp::List< ::capnp::compiler::Statement>::Builder Statement::Builder::getBlock() {
1077
  KJ_IREQUIRE((which() == Statement::BLOCK),
1078
              "Must check which() before get()ing a union member.");
1079
  return ::capnp::_::PointerHelpers< ::capnp::List< ::capnp::compiler::Statement>>::get(_builder.getPointerField(
1080
      ::capnp::bounded<1>() * ::capnp::POINTERS));
1081 1082 1083
}
inline void Statement::Builder::setBlock( ::capnp::List< ::capnp::compiler::Statement>::Reader value) {
  _builder.setDataField<Statement::Which>(
1084
      ::capnp::bounded<0>() * ::capnp::ELEMENTS, Statement::BLOCK);
1085
  ::capnp::_::PointerHelpers< ::capnp::List< ::capnp::compiler::Statement>>::set(_builder.getPointerField(
1086
      ::capnp::bounded<1>() * ::capnp::POINTERS), value);
1087
}
1088 1089
inline  ::capnp::List< ::capnp::compiler::Statement>::Builder Statement::Builder::initBlock(unsigned int size) {
  _builder.setDataField<Statement::Which>(
1090
      ::capnp::bounded<0>() * ::capnp::ELEMENTS, Statement::BLOCK);
1091
  return ::capnp::_::PointerHelpers< ::capnp::List< ::capnp::compiler::Statement>>::init(_builder.getPointerField(
1092
      ::capnp::bounded<1>() * ::capnp::POINTERS), size);
1093
}
1094 1095 1096
inline void Statement::Builder::adoptBlock(
    ::capnp::Orphan< ::capnp::List< ::capnp::compiler::Statement>>&& value) {
  _builder.setDataField<Statement::Which>(
1097
      ::capnp::bounded<0>() * ::capnp::ELEMENTS, Statement::BLOCK);
1098
  ::capnp::_::PointerHelpers< ::capnp::List< ::capnp::compiler::Statement>>::adopt(_builder.getPointerField(
1099
      ::capnp::bounded<1>() * ::capnp::POINTERS), kj::mv(value));
1100
}
1101
inline ::capnp::Orphan< ::capnp::List< ::capnp::compiler::Statement>> Statement::Builder::disownBlock() {
1102
  KJ_IREQUIRE((which() == Statement::BLOCK),
1103
              "Must check which() before get()ing a union member.");
1104
  return ::capnp::_::PointerHelpers< ::capnp::List< ::capnp::compiler::Statement>>::disown(_builder.getPointerField(
1105
      ::capnp::bounded<1>() * ::capnp::POINTERS));
1106
}
1107

1108
inline bool Statement::Reader::hasDocComment() const {
1109
  return !_reader.getPointerField(
1110
      ::capnp::bounded<2>() * ::capnp::POINTERS).isNull();
1111 1112
}
inline bool Statement::Builder::hasDocComment() {
1113
  return !_builder.getPointerField(
1114
      ::capnp::bounded<2>() * ::capnp::POINTERS).isNull();
1115 1116
}
inline  ::capnp::Text::Reader Statement::Reader::getDocComment() const {
1117
  return ::capnp::_::PointerHelpers< ::capnp::Text>::get(_reader.getPointerField(
1118
      ::capnp::bounded<2>() * ::capnp::POINTERS));
1119 1120
}
inline  ::capnp::Text::Builder Statement::Builder::getDocComment() {
1121
  return ::capnp::_::PointerHelpers< ::capnp::Text>::get(_builder.getPointerField(
1122
      ::capnp::bounded<2>() * ::capnp::POINTERS));
1123 1124
}
inline void Statement::Builder::setDocComment( ::capnp::Text::Reader value) {
1125
  ::capnp::_::PointerHelpers< ::capnp::Text>::set(_builder.getPointerField(
1126
      ::capnp::bounded<2>() * ::capnp::POINTERS), value);
1127 1128
}
inline  ::capnp::Text::Builder Statement::Builder::initDocComment(unsigned int size) {
1129
  return ::capnp::_::PointerHelpers< ::capnp::Text>::init(_builder.getPointerField(
1130
      ::capnp::bounded<2>() * ::capnp::POINTERS), size);
1131 1132 1133
}
inline void Statement::Builder::adoptDocComment(
    ::capnp::Orphan< ::capnp::Text>&& value) {
1134
  ::capnp::_::PointerHelpers< ::capnp::Text>::adopt(_builder.getPointerField(
1135
      ::capnp::bounded<2>() * ::capnp::POINTERS), kj::mv(value));
1136 1137
}
inline ::capnp::Orphan< ::capnp::Text> Statement::Builder::disownDocComment() {
1138
  return ::capnp::_::PointerHelpers< ::capnp::Text>::disown(_builder.getPointerField(
1139
      ::capnp::bounded<2>() * ::capnp::POINTERS));
1140
}
1141

1142 1143
inline  ::uint32_t Statement::Reader::getStartByte() const {
  return _reader.getDataField< ::uint32_t>(
1144
      ::capnp::bounded<1>() * ::capnp::ELEMENTS);
1145
}
1146

1147 1148
inline  ::uint32_t Statement::Builder::getStartByte() {
  return _builder.getDataField< ::uint32_t>(
1149
      ::capnp::bounded<1>() * ::capnp::ELEMENTS);
1150 1151 1152
}
inline void Statement::Builder::setStartByte( ::uint32_t value) {
  _builder.setDataField< ::uint32_t>(
1153
      ::capnp::bounded<1>() * ::capnp::ELEMENTS, value);
1154
}
1155

1156 1157
inline  ::uint32_t Statement::Reader::getEndByte() const {
  return _reader.getDataField< ::uint32_t>(
1158
      ::capnp::bounded<2>() * ::capnp::ELEMENTS);
1159
}
1160

1161 1162
inline  ::uint32_t Statement::Builder::getEndByte() {
  return _builder.getDataField< ::uint32_t>(
1163
      ::capnp::bounded<2>() * ::capnp::ELEMENTS);
1164 1165 1166
}
inline void Statement::Builder::setEndByte( ::uint32_t value) {
  _builder.setDataField< ::uint32_t>(
1167
      ::capnp::bounded<2>() * ::capnp::ELEMENTS, value);
1168
}
1169 1170

inline bool LexedTokens::Reader::hasTokens() const {
1171
  return !_reader.getPointerField(
1172
      ::capnp::bounded<0>() * ::capnp::POINTERS).isNull();
1173 1174
}
inline bool LexedTokens::Builder::hasTokens() {
1175
  return !_builder.getPointerField(
1176
      ::capnp::bounded<0>() * ::capnp::POINTERS).isNull();
1177 1178
}
inline  ::capnp::List< ::capnp::compiler::Token>::Reader LexedTokens::Reader::getTokens() const {
1179
  return ::capnp::_::PointerHelpers< ::capnp::List< ::capnp::compiler::Token>>::get(_reader.getPointerField(
1180
      ::capnp::bounded<0>() * ::capnp::POINTERS));
1181 1182
}
inline  ::capnp::List< ::capnp::compiler::Token>::Builder LexedTokens::Builder::getTokens() {
1183
  return ::capnp::_::PointerHelpers< ::capnp::List< ::capnp::compiler::Token>>::get(_builder.getPointerField(
1184
      ::capnp::bounded<0>() * ::capnp::POINTERS));
1185 1186
}
inline void LexedTokens::Builder::setTokens( ::capnp::List< ::capnp::compiler::Token>::Reader value) {
1187
  ::capnp::_::PointerHelpers< ::capnp::List< ::capnp::compiler::Token>>::set(_builder.getPointerField(
1188
      ::capnp::bounded<0>() * ::capnp::POINTERS), value);
1189 1190
}
inline  ::capnp::List< ::capnp::compiler::Token>::Builder LexedTokens::Builder::initTokens(unsigned int size) {
1191
  return ::capnp::_::PointerHelpers< ::capnp::List< ::capnp::compiler::Token>>::init(_builder.getPointerField(
1192
      ::capnp::bounded<0>() * ::capnp::POINTERS), size);
1193 1194 1195
}
inline void LexedTokens::Builder::adoptTokens(
    ::capnp::Orphan< ::capnp::List< ::capnp::compiler::Token>>&& value) {
1196
  ::capnp::_::PointerHelpers< ::capnp::List< ::capnp::compiler::Token>>::adopt(_builder.getPointerField(
1197
      ::capnp::bounded<0>() * ::capnp::POINTERS), kj::mv(value));
1198 1199
}
inline ::capnp::Orphan< ::capnp::List< ::capnp::compiler::Token>> LexedTokens::Builder::disownTokens() {
1200
  return ::capnp::_::PointerHelpers< ::capnp::List< ::capnp::compiler::Token>>::disown(_builder.getPointerField(
1201
      ::capnp::bounded<0>() * ::capnp::POINTERS));
1202 1203 1204
}

inline bool LexedStatements::Reader::hasStatements() const {
1205
  return !_reader.getPointerField(
1206
      ::capnp::bounded<0>() * ::capnp::POINTERS).isNull();
1207 1208
}
inline bool LexedStatements::Builder::hasStatements() {
1209
  return !_builder.getPointerField(
1210
      ::capnp::bounded<0>() * ::capnp::POINTERS).isNull();
1211 1212
}
inline  ::capnp::List< ::capnp::compiler::Statement>::Reader LexedStatements::Reader::getStatements() const {
1213
  return ::capnp::_::PointerHelpers< ::capnp::List< ::capnp::compiler::Statement>>::get(_reader.getPointerField(
1214
      ::capnp::bounded<0>() * ::capnp::POINTERS));
1215 1216
}
inline  ::capnp::List< ::capnp::compiler::Statement>::Builder LexedStatements::Builder::getStatements() {
1217
  return ::capnp::_::PointerHelpers< ::capnp::List< ::capnp::compiler::Statement>>::get(_builder.getPointerField(
1218
      ::capnp::bounded<0>() * ::capnp::POINTERS));
1219 1220
}
inline void LexedStatements::Builder::setStatements( ::capnp::List< ::capnp::compiler::Statement>::Reader value) {
1221
  ::capnp::_::PointerHelpers< ::capnp::List< ::capnp::compiler::Statement>>::set(_builder.getPointerField(
1222
      ::capnp::bounded<0>() * ::capnp::POINTERS), value);
1223 1224
}
inline  ::capnp::List< ::capnp::compiler::Statement>::Builder LexedStatements::Builder::initStatements(unsigned int size) {
1225
  return ::capnp::_::PointerHelpers< ::capnp::List< ::capnp::compiler::Statement>>::init(_builder.getPointerField(
1226
      ::capnp::bounded<0>() * ::capnp::POINTERS), size);
1227 1228 1229
}
inline void LexedStatements::Builder::adoptStatements(
    ::capnp::Orphan< ::capnp::List< ::capnp::compiler::Statement>>&& value) {
1230
  ::capnp::_::PointerHelpers< ::capnp::List< ::capnp::compiler::Statement>>::adopt(_builder.getPointerField(
1231
      ::capnp::bounded<0>() * ::capnp::POINTERS), kj::mv(value));
1232 1233
}
inline ::capnp::Orphan< ::capnp::List< ::capnp::compiler::Statement>> LexedStatements::Builder::disownStatements() {
1234
  return ::capnp::_::PointerHelpers< ::capnp::List< ::capnp::compiler::Statement>>::disown(_builder.getPointerField(
1235
      ::capnp::bounded<0>() * ::capnp::POINTERS));
1236 1237 1238 1239
}

}  // namespace
}  // namespace
1240