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
14namespace capnp {
15namespace schemas {
16
17CAPNP_DECLARE_SCHEMA(91cc55cd57de5419);
18CAPNP_DECLARE_SCHEMA(c6725e678d60fa37);
19CAPNP_DECLARE_SCHEMA(9e69a92512b19d18);
20CAPNP_DECLARE_SCHEMA(a11f97b9d6c73dd4);
21
22} // namespace schemas
23} // namespace capnp
24
25namespace capnp {
26namespace compiler {
27
28struct 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
53struct 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
72struct 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
87struct 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
104class Token::Reader {
105public:
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
156private:
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
168class Token::Builder {
169public:
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
249private:
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
259class Token::Pipeline {
260public:
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
267private:
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
275class Statement::Reader {
276public:
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
310private:
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
322class Statement::Builder {
323public:
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
371private:
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
381class Statement::Pipeline {
382public:
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
389private:
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
397class LexedTokens::Reader {
398public:
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
417private:
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
429class LexedTokens::Builder {
430public:
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
452private:
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
462class LexedTokens::Pipeline {
463public:
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
470private:
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
478class LexedStatements::Reader {
479public:
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
498private:
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
510class LexedStatements::Builder {
511public:
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
533private:
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
543class LexedStatements::Pipeline {
544public:
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
551private:
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
561inline ::capnp::compiler::Token::Which Token::Reader::which() const {
562 return _reader.getDataField<Which>(
563 ::capnp::bounded<0>() * ::capnp::ELEMENTS);
564}
565inline ::capnp::compiler::Token::Which Token::Builder::which() {
566 return _builder.getDataField<Which>(
567 ::capnp::bounded<0>() * ::capnp::ELEMENTS);
568}
569
570inline bool Token::Reader::isIdentifier() const {
571 return which() == Token::IDENTIFIER;
572}
573inline bool Token::Builder::isIdentifier() {
574 return which() == Token::IDENTIFIER;
575}
576inline bool Token::Reader::hasIdentifier() const {
577 if (which() != Token::IDENTIFIER) return false;
578 return !_reader.getPointerField(
579 ::capnp::bounded<0>() * ::capnp::POINTERS).isNull();
580}
581inline bool Token::Builder::hasIdentifier() {
582 if (which() != Token::IDENTIFIER) return false;
583 return !_builder.getPointerField(
584 ::capnp::bounded<0>() * ::capnp::POINTERS).isNull();
585}
586inline ::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}
592inline ::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}
598inline 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}
604inline ::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}
610inline 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}
617inline ::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
624inline bool Token::Reader::isStringLiteral() const {
625 return which() == Token::STRING_LITERAL;
626}
627inline bool Token::Builder::isStringLiteral() {
628 return which() == Token::STRING_LITERAL;
629}
630inline 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}
635inline bool Token::Builder::hasStringLiteral() {
636 if (which() != Token::STRING_LITERAL) return false;
637 return !_builder.getPointerField(
638 ::capnp::bounded<0>() * ::capnp::POINTERS).isNull();
639}
640inline ::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}
646inline ::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}
652inline 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}
658inline ::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}
664inline 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}
671inline ::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
678inline bool Token::Reader::isIntegerLiteral() const {
679 return which() == Token::INTEGER_LITERAL;
680}
681inline bool Token::Builder::isIntegerLiteral() {
682 return which() == Token::INTEGER_LITERAL;
683}
684inline ::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
691inline ::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}
697inline 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
704inline bool Token::Reader::isFloatLiteral() const {
705 return which() == Token::FLOAT_LITERAL;
706}
707inline bool Token::Builder::isFloatLiteral() {
708 return which() == Token::FLOAT_LITERAL;
709}
710inline 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
717inline 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}
723inline 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
730inline bool Token::Reader::isOperator() const {
731 return which() == Token::OPERATOR;
732}
733inline bool Token::Builder::isOperator() {
734 return which() == Token::OPERATOR;
735}
736inline bool Token::Reader::hasOperator() const {
737 if (which() != Token::OPERATOR) return false;
738 return !_reader.getPointerField(
739 ::capnp::bounded<0>() * ::capnp::POINTERS).isNull();
740}
741inline bool Token::Builder::hasOperator() {
742 if (which() != Token::OPERATOR) return false;
743 return !_builder.getPointerField(
744 ::capnp::bounded<0>() * ::capnp::POINTERS).isNull();
745}
746inline ::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}
752inline ::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}
758inline 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}
764inline ::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}
770inline 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}
777inline ::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
784inline bool Token::Reader::isParenthesizedList() const {
785 return which() == Token::PARENTHESIZED_LIST;
786}
787inline bool Token::Builder::isParenthesizedList() {
788 return which() == Token::PARENTHESIZED_LIST;
789}
790inline 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}
795inline bool Token::Builder::hasParenthesizedList() {
796 if (which() != Token::PARENTHESIZED_LIST) return false;
797 return !_builder.getPointerField(
798 ::capnp::bounded<0>() * ::capnp::POINTERS).isNull();
799}
800inline ::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}
806inline ::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}
812inline 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}
818inline 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}
824inline ::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}
830inline 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}
837inline ::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
844inline bool Token::Reader::isBracketedList() const {
845 return which() == Token::BRACKETED_LIST;
846}
847inline bool Token::Builder::isBracketedList() {
848 return which() == Token::BRACKETED_LIST;
849}
850inline 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}
855inline bool Token::Builder::hasBracketedList() {
856 if (which() != Token::BRACKETED_LIST) return false;
857 return !_builder.getPointerField(
858 ::capnp::bounded<0>() * ::capnp::POINTERS).isNull();
859}
860inline ::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}
866inline ::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}
872inline 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}
878inline 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}
884inline ::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}
890inline 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}
897inline ::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
904inline ::uint32_t Token::Reader::getStartByte() const {
905 return _reader.getDataField< ::uint32_t>(
906 ::capnp::bounded<1>() * ::capnp::ELEMENTS);
907}
908
909inline ::uint32_t Token::Builder::getStartByte() {
910 return _builder.getDataField< ::uint32_t>(
911 ::capnp::bounded<1>() * ::capnp::ELEMENTS);
912}
913inline void Token::Builder::setStartByte( ::uint32_t value) {
914 _builder.setDataField< ::uint32_t>(
915 ::capnp::bounded<1>() * ::capnp::ELEMENTS, value);
916}
917
918inline ::uint32_t Token::Reader::getEndByte() const {
919 return _reader.getDataField< ::uint32_t>(
920 ::capnp::bounded<4>() * ::capnp::ELEMENTS);
921}
922
923inline ::uint32_t Token::Builder::getEndByte() {
924 return _builder.getDataField< ::uint32_t>(
925 ::capnp::bounded<4>() * ::capnp::ELEMENTS);
926}
927inline void Token::Builder::setEndByte( ::uint32_t value) {
928 _builder.setDataField< ::uint32_t>(
929 ::capnp::bounded<4>() * ::capnp::ELEMENTS, value);
930}
931
932inline bool Token::Reader::isBinaryLiteral() const {
933 return which() == Token::BINARY_LITERAL;
934}
935inline bool Token::Builder::isBinaryLiteral() {
936 return which() == Token::BINARY_LITERAL;
937}
938inline 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}
943inline bool Token::Builder::hasBinaryLiteral() {
944 if (which() != Token::BINARY_LITERAL) return false;
945 return !_builder.getPointerField(
946 ::capnp::bounded<0>() * ::capnp::POINTERS).isNull();
947}
948inline ::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}
954inline ::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}
960inline 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}
966inline ::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}
972inline 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}
979inline ::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
986inline ::capnp::compiler::Statement::Which Statement::Reader::which() const {
987 return _reader.getDataField<Which>(
988 ::capnp::bounded<0>() * ::capnp::ELEMENTS);
989}
990inline ::capnp::compiler::Statement::Which Statement::Builder::which() {
991 return _builder.getDataField<Which>(
992 ::capnp::bounded<0>() * ::capnp::ELEMENTS);
993}
994
995inline bool Statement::Reader::hasTokens() const {
996 return !_reader.getPointerField(
997 ::capnp::bounded<0>() * ::capnp::POINTERS).isNull();
998}
999inline bool Statement::Builder::hasTokens() {
1000 return !_builder.getPointerField(
1001 ::capnp::bounded<0>() * ::capnp::POINTERS).isNull();
1002}
1003inline ::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}
1007inline ::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}
1011inline 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}
1015inline ::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}
1019inline 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}
1024inline ::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
1029inline bool Statement::Reader::isLine() const {
1030 return which() == Statement::LINE;
1031}
1032inline bool Statement::Builder::isLine() {
1033 return which() == Statement::LINE;
1034}
1035inline ::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
1042inline ::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}
1048inline 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
1055inline bool Statement::Reader::isBlock() const {
1056 return which() == Statement::BLOCK;
1057}
1058inline bool Statement::Builder::isBlock() {
1059 return which() == Statement::BLOCK;
1060}
1061inline bool Statement::Reader::hasBlock() const {
1062 if (which() != Statement::BLOCK) return false;
1063 return !_reader.getPointerField(
1064 ::capnp::bounded<1>() * ::capnp::POINTERS).isNull();
1065}
1066inline bool Statement::Builder::hasBlock() {
1067 if (which() != Statement::BLOCK) return false;
1068 return !_builder.getPointerField(
1069 ::capnp::bounded<1>() * ::capnp::POINTERS).isNull();
1070}
1071inline ::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}
1077inline ::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}
1083inline 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}
1089inline ::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}
1095inline 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}
1102inline ::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
1109inline bool Statement::Reader::hasDocComment() const {
1110 return !_reader.getPointerField(
1111 ::capnp::bounded<2>() * ::capnp::POINTERS).isNull();
1112}
1113inline bool Statement::Builder::hasDocComment() {
1114 return !_builder.getPointerField(
1115 ::capnp::bounded<2>() * ::capnp::POINTERS).isNull();
1116}
1117inline ::capnp::Text::Reader Statement::Reader::getDocComment() const {
1118 return ::capnp::_::PointerHelpers< ::capnp::Text>::get(_reader.getPointerField(
1119 ::capnp::bounded<2>() * ::capnp::POINTERS));
1120}
1121inline ::capnp::Text::Builder Statement::Builder::getDocComment() {
1122 return ::capnp::_::PointerHelpers< ::capnp::Text>::get(_builder.getPointerField(
1123 ::capnp::bounded<2>() * ::capnp::POINTERS));
1124}
1125inline void Statement::Builder::setDocComment( ::capnp::Text::Reader value) {
1126 ::capnp::_::PointerHelpers< ::capnp::Text>::set(_builder.getPointerField(
1127 ::capnp::bounded<2>() * ::capnp::POINTERS), value);
1128}
1129inline ::capnp::Text::Builder Statement::Builder::initDocComment(unsigned int size) {
1130 return ::capnp::_::PointerHelpers< ::capnp::Text>::init(_builder.getPointerField(
1131 ::capnp::bounded<2>() * ::capnp::POINTERS), size);
1132}
1133inline void Statement::Builder::adoptDocComment(
1134 ::capnp::Orphan< ::capnp::Text>&& value) {
1135 ::capnp::_::PointerHelpers< ::capnp::Text>::adopt(_builder.getPointerField(
1136 ::capnp::bounded<2>() * ::capnp::POINTERS), kj::mv(value));
1137}
1138inline ::capnp::Orphan< ::capnp::Text> Statement::Builder::disownDocComment() {
1139 return ::capnp::_::PointerHelpers< ::capnp::Text>::disown(_builder.getPointerField(
1140 ::capnp::bounded<2>() * ::capnp::POINTERS));
1141}
1142
1143inline ::uint32_t Statement::Reader::getStartByte() const {
1144 return _reader.getDataField< ::uint32_t>(
1145 ::capnp::bounded<1>() * ::capnp::ELEMENTS);
1146}
1147
1148inline ::uint32_t Statement::Builder::getStartByte() {
1149 return _builder.getDataField< ::uint32_t>(
1150 ::capnp::bounded<1>() * ::capnp::ELEMENTS);
1151}
1152inline void Statement::Builder::setStartByte( ::uint32_t value) {
1153 _builder.setDataField< ::uint32_t>(
1154 ::capnp::bounded<1>() * ::capnp::ELEMENTS, value);
1155}
1156
1157inline ::uint32_t Statement::Reader::getEndByte() const {
1158 return _reader.getDataField< ::uint32_t>(
1159 ::capnp::bounded<2>() * ::capnp::ELEMENTS);
1160}
1161
1162inline ::uint32_t Statement::Builder::getEndByte() {
1163 return _builder.getDataField< ::uint32_t>(
1164 ::capnp::bounded<2>() * ::capnp::ELEMENTS);
1165}
1166inline void Statement::Builder::setEndByte( ::uint32_t value) {
1167 _builder.setDataField< ::uint32_t>(
1168 ::capnp::bounded<2>() * ::capnp::ELEMENTS, value);
1169}
1170
1171inline bool LexedTokens::Reader::hasTokens() const {
1172 return !_reader.getPointerField(
1173 ::capnp::bounded<0>() * ::capnp::POINTERS).isNull();
1174}
1175inline bool LexedTokens::Builder::hasTokens() {
1176 return !_builder.getPointerField(
1177 ::capnp::bounded<0>() * ::capnp::POINTERS).isNull();
1178}
1179inline ::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}
1183inline ::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}
1187inline 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}
1191inline ::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}
1195inline 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}
1200inline ::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
1205inline bool LexedStatements::Reader::hasStatements() const {
1206 return !_reader.getPointerField(
1207 ::capnp::bounded<0>() * ::capnp::POINTERS).isNull();
1208}
1209inline bool LexedStatements::Builder::hasStatements() {
1210 return !_builder.getPointerField(
1211 ::capnp::bounded<0>() * ::capnp::POINTERS).isNull();
1212}
1213inline ::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}
1217inline ::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}
1221inline 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}
1225inline ::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}
1229inline 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}
1234inline ::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