| 1 | // _gen/core/value.asdl.h is generated by asdl_main.py
|
| 2 |
|
| 3 | #ifndef VALUE_ASDL
|
| 4 | #define VALUE_ASDL
|
| 5 |
|
| 6 | #include <cstdint>
|
| 7 | #include "mycpp/runtime.h"
|
| 8 |
|
| 9 | #include "asdl/cpp_runtime.h"
|
| 10 | namespace syntax_asdl { class loc_t; class Token; class expr_t; class command_t; class DoubleQuoted; class re_t; class proc_sig_t; class Func; class NameType; class EggexFlag; class BraceGroup; class SourceLine; class debug_frame_t; class ShFunction; class cmd_frag_t; }
|
| 11 |
|
| 12 | namespace runtime_asdl { class Cell; }
|
| 13 |
|
| 14 | namespace value_asdl {
|
| 15 |
|
| 16 | // use struct instead of namespace so 'using' works consistently
|
| 17 | #define ASDL_NAMES struct
|
| 18 |
|
| 19 | class IntBox;
|
| 20 | class InitializerValue;
|
| 21 | class ProcDefaults;
|
| 22 | class LeftName;
|
| 23 | class y_lvalue_t;
|
| 24 | class sh_lvalue_t;
|
| 25 | class eggex_ops_t;
|
| 26 | class RegexMatch;
|
| 27 | class regex_match_t;
|
| 28 | class Obj;
|
| 29 | class value_t;
|
| 30 |
|
| 31 | ASDL_NAMES y_lvalue_e {
|
| 32 | enum no_name {
|
| 33 | Local = 67,
|
| 34 | Container = 2,
|
| 35 | };
|
| 36 | };
|
| 37 |
|
| 38 | BigStr* y_lvalue_str(int tag, bool dot = true);
|
| 39 |
|
| 40 | class y_lvalue_t {
|
| 41 | protected:
|
| 42 | y_lvalue_t() {
|
| 43 | }
|
| 44 | public:
|
| 45 | int tag() const {
|
| 46 | return ObjHeader::FromObject(this)->type_tag;
|
| 47 | }
|
| 48 | hnode_t* PrettyTree(bool do_abbrev, Dict<int, bool>* seen = nullptr);
|
| 49 |
|
| 50 | DISALLOW_COPY_AND_ASSIGN(y_lvalue_t)
|
| 51 | };
|
| 52 |
|
| 53 | class y_lvalue__Container : public y_lvalue_t {
|
| 54 | public:
|
| 55 | y_lvalue__Container(value_t* obj, value_t* index)
|
| 56 | : obj(obj),
|
| 57 | index(index) {
|
| 58 | }
|
| 59 |
|
| 60 | static y_lvalue__Container* CreateNull(bool alloc_lists = false) {
|
| 61 | return Alloc<y_lvalue__Container>(nullptr, nullptr);
|
| 62 | }
|
| 63 |
|
| 64 | hnode_t* PrettyTree(bool do_abbrev, Dict<int, bool>* seen = nullptr);
|
| 65 |
|
| 66 | static constexpr ObjHeader obj_header() {
|
| 67 | return ObjHeader::AsdlClass(static_cast<uint16_t>(y_lvalue_e::Container),
|
| 68 | 2);
|
| 69 | }
|
| 70 | value_t* obj;
|
| 71 | value_t* index;
|
| 72 |
|
| 73 | DISALLOW_COPY_AND_ASSIGN(y_lvalue__Container)
|
| 74 | };
|
| 75 |
|
| 76 | ASDL_NAMES y_lvalue {
|
| 77 | typedef y_lvalue__Container Container;
|
| 78 | };
|
| 79 |
|
| 80 | ASDL_NAMES sh_lvalue_e {
|
| 81 | enum no_name {
|
| 82 | Var = 67,
|
| 83 | Indexed = 2,
|
| 84 | Keyed = 3,
|
| 85 | };
|
| 86 | };
|
| 87 |
|
| 88 | BigStr* sh_lvalue_str(int tag, bool dot = true);
|
| 89 |
|
| 90 | class sh_lvalue_t {
|
| 91 | protected:
|
| 92 | sh_lvalue_t() {
|
| 93 | }
|
| 94 | public:
|
| 95 | int tag() const {
|
| 96 | return ObjHeader::FromObject(this)->type_tag;
|
| 97 | }
|
| 98 | hnode_t* PrettyTree(bool do_abbrev, Dict<int, bool>* seen = nullptr);
|
| 99 |
|
| 100 | DISALLOW_COPY_AND_ASSIGN(sh_lvalue_t)
|
| 101 | };
|
| 102 |
|
| 103 | class sh_lvalue__Indexed : public sh_lvalue_t {
|
| 104 | public:
|
| 105 | sh_lvalue__Indexed(BigStr* name, int index, syntax_asdl::loc_t* blame_loc)
|
| 106 | : name(name),
|
| 107 | blame_loc(blame_loc),
|
| 108 | index(index) {
|
| 109 | }
|
| 110 |
|
| 111 | static sh_lvalue__Indexed* CreateNull(bool alloc_lists = false) {
|
| 112 | return Alloc<sh_lvalue__Indexed>(kEmptyString, -1, nullptr);
|
| 113 | }
|
| 114 |
|
| 115 | hnode_t* PrettyTree(bool do_abbrev, Dict<int, bool>* seen = nullptr);
|
| 116 |
|
| 117 | static constexpr ObjHeader obj_header() {
|
| 118 | return ObjHeader::AsdlClass(static_cast<uint16_t>(sh_lvalue_e::Indexed), 2);
|
| 119 | }
|
| 120 | BigStr* name;
|
| 121 | syntax_asdl::loc_t* blame_loc;
|
| 122 | int index;
|
| 123 |
|
| 124 | DISALLOW_COPY_AND_ASSIGN(sh_lvalue__Indexed)
|
| 125 | };
|
| 126 |
|
| 127 | class sh_lvalue__Keyed : public sh_lvalue_t {
|
| 128 | public:
|
| 129 | sh_lvalue__Keyed(BigStr* name, BigStr* key, syntax_asdl::loc_t* blame_loc)
|
| 130 | : name(name),
|
| 131 | key(key),
|
| 132 | blame_loc(blame_loc) {
|
| 133 | }
|
| 134 |
|
| 135 | static sh_lvalue__Keyed* CreateNull(bool alloc_lists = false) {
|
| 136 | return Alloc<sh_lvalue__Keyed>(kEmptyString, kEmptyString, nullptr);
|
| 137 | }
|
| 138 |
|
| 139 | hnode_t* PrettyTree(bool do_abbrev, Dict<int, bool>* seen = nullptr);
|
| 140 |
|
| 141 | static constexpr ObjHeader obj_header() {
|
| 142 | return ObjHeader::AsdlClass(static_cast<uint16_t>(sh_lvalue_e::Keyed), 3);
|
| 143 | }
|
| 144 | BigStr* name;
|
| 145 | BigStr* key;
|
| 146 | syntax_asdl::loc_t* blame_loc;
|
| 147 |
|
| 148 | DISALLOW_COPY_AND_ASSIGN(sh_lvalue__Keyed)
|
| 149 | };
|
| 150 |
|
| 151 | ASDL_NAMES sh_lvalue {
|
| 152 | typedef sh_lvalue__Indexed Indexed;
|
| 153 | typedef sh_lvalue__Keyed Keyed;
|
| 154 | };
|
| 155 |
|
| 156 | ASDL_NAMES eggex_ops_e {
|
| 157 | enum no_name {
|
| 158 | No = 1,
|
| 159 | Yes = 2,
|
| 160 | };
|
| 161 | };
|
| 162 |
|
| 163 | BigStr* eggex_ops_str(int tag, bool dot = true);
|
| 164 |
|
| 165 | class eggex_ops_t {
|
| 166 | protected:
|
| 167 | eggex_ops_t() {
|
| 168 | }
|
| 169 | public:
|
| 170 | int tag() const {
|
| 171 | return ObjHeader::FromObject(this)->type_tag;
|
| 172 | }
|
| 173 | hnode_t* PrettyTree(bool do_abbrev, Dict<int, bool>* seen = nullptr);
|
| 174 |
|
| 175 | DISALLOW_COPY_AND_ASSIGN(eggex_ops_t)
|
| 176 | };
|
| 177 |
|
| 178 | class eggex_ops__No : public eggex_ops_t {
|
| 179 | public:
|
| 180 | eggex_ops__No() {}
|
| 181 |
|
| 182 | hnode_t* PrettyTree(bool do_abbrev, Dict<int, bool>* seen = nullptr);
|
| 183 |
|
| 184 | static constexpr ObjHeader obj_header() {
|
| 185 | return ObjHeader::AsdlClass(static_cast<uint16_t>(eggex_ops_e::No), 0);
|
| 186 | }
|
| 187 |
|
| 188 | DISALLOW_COPY_AND_ASSIGN(eggex_ops__No)
|
| 189 | };
|
| 190 |
|
| 191 | class eggex_ops__Yes : public eggex_ops_t {
|
| 192 | public:
|
| 193 | eggex_ops__Yes(List<value_t*>* convert_funcs, List<syntax_asdl::Token*>*
|
| 194 | convert_toks, List<BigStr*>* capture_names)
|
| 195 | : convert_funcs(convert_funcs),
|
| 196 | convert_toks(convert_toks),
|
| 197 | capture_names(capture_names) {
|
| 198 | }
|
| 199 |
|
| 200 | static eggex_ops__Yes* CreateNull(bool alloc_lists = false) {
|
| 201 | return Alloc<eggex_ops__Yes>(alloc_lists ? Alloc<List<value_t*>>() :
|
| 202 | nullptr, alloc_lists ?
|
| 203 | Alloc<List<syntax_asdl::Token*>>() : nullptr,
|
| 204 | alloc_lists ? Alloc<List<BigStr*>>() :
|
| 205 | nullptr);
|
| 206 | }
|
| 207 |
|
| 208 | hnode_t* PrettyTree(bool do_abbrev, Dict<int, bool>* seen = nullptr);
|
| 209 |
|
| 210 | static constexpr ObjHeader obj_header() {
|
| 211 | return ObjHeader::AsdlClass(static_cast<uint16_t>(eggex_ops_e::Yes), 3);
|
| 212 | }
|
| 213 | List<value_t*>* convert_funcs;
|
| 214 | List<syntax_asdl::Token*>* convert_toks;
|
| 215 | List<BigStr*>* capture_names;
|
| 216 |
|
| 217 | DISALLOW_COPY_AND_ASSIGN(eggex_ops__Yes)
|
| 218 | };
|
| 219 |
|
| 220 | extern GcGlobal<eggex_ops__No> geggex_ops__No;
|
| 221 | ASDL_NAMES eggex_ops {
|
| 222 | static eggex_ops__No* No;
|
| 223 | typedef eggex_ops__Yes Yes;
|
| 224 | };
|
| 225 |
|
| 226 | ASDL_NAMES regex_match_e {
|
| 227 | enum no_name {
|
| 228 | No = 1,
|
| 229 | Yes = 68,
|
| 230 | };
|
| 231 | };
|
| 232 |
|
| 233 | BigStr* regex_match_str(int tag, bool dot = true);
|
| 234 |
|
| 235 | class regex_match_t {
|
| 236 | protected:
|
| 237 | regex_match_t() {
|
| 238 | }
|
| 239 | public:
|
| 240 | int tag() const {
|
| 241 | return ObjHeader::FromObject(this)->type_tag;
|
| 242 | }
|
| 243 | hnode_t* PrettyTree(bool do_abbrev, Dict<int, bool>* seen = nullptr);
|
| 244 |
|
| 245 | DISALLOW_COPY_AND_ASSIGN(regex_match_t)
|
| 246 | };
|
| 247 |
|
| 248 | class regex_match__No : public regex_match_t {
|
| 249 | public:
|
| 250 | regex_match__No() {}
|
| 251 |
|
| 252 | hnode_t* PrettyTree(bool do_abbrev, Dict<int, bool>* seen = nullptr);
|
| 253 |
|
| 254 | static constexpr ObjHeader obj_header() {
|
| 255 | return ObjHeader::AsdlClass(static_cast<uint16_t>(regex_match_e::No), 0);
|
| 256 | }
|
| 257 |
|
| 258 | DISALLOW_COPY_AND_ASSIGN(regex_match__No)
|
| 259 | };
|
| 260 |
|
| 261 | extern GcGlobal<regex_match__No> gregex_match__No;
|
| 262 | ASDL_NAMES regex_match {
|
| 263 | static regex_match__No* No;
|
| 264 | };
|
| 265 |
|
| 266 | ASDL_NAMES value_e {
|
| 267 | enum no_name {
|
| 268 | Interrupted = 1,
|
| 269 | Stdin = 2,
|
| 270 | Slice = 3,
|
| 271 | Undef = 4,
|
| 272 | Str = 5,
|
| 273 | InitializerList = 6,
|
| 274 | InternalStringArray = 7,
|
| 275 | BashArray = 8,
|
| 276 | BashAssoc = 9,
|
| 277 | Null = 10,
|
| 278 | Bool = 11,
|
| 279 | Int = 12,
|
| 280 | Float = 13,
|
| 281 | List = 14,
|
| 282 | Dict = 15,
|
| 283 | Obj = 69,
|
| 284 | Range = 17,
|
| 285 | Eggex = 18,
|
| 286 | Match = 68,
|
| 287 | Place = 20,
|
| 288 | Frame = 21,
|
| 289 | DebugFrame = 22,
|
| 290 | BoundFunc = 23,
|
| 291 | BuiltinFunc = 24,
|
| 292 | Func = 25,
|
| 293 | BuiltinProc = 26,
|
| 294 | Proc = 27,
|
| 295 | Expr = 28,
|
| 296 | CommandFrag = 29,
|
| 297 | Command = 30,
|
| 298 | };
|
| 299 | };
|
| 300 |
|
| 301 | BigStr* value_str(int tag, bool dot = true);
|
| 302 |
|
| 303 | class value_t {
|
| 304 | protected:
|
| 305 | value_t() {
|
| 306 | }
|
| 307 | public:
|
| 308 | int tag() const {
|
| 309 | return ObjHeader::FromObject(this)->type_tag;
|
| 310 | }
|
| 311 | hnode_t* PrettyTree(bool do_abbrev, Dict<int, bool>* seen = nullptr);
|
| 312 |
|
| 313 | DISALLOW_COPY_AND_ASSIGN(value_t)
|
| 314 | };
|
| 315 |
|
| 316 | class value__Interrupted : public value_t {
|
| 317 | public:
|
| 318 | value__Interrupted() {}
|
| 319 |
|
| 320 | hnode_t* PrettyTree(bool do_abbrev, Dict<int, bool>* seen = nullptr);
|
| 321 |
|
| 322 | static constexpr ObjHeader obj_header() {
|
| 323 | return ObjHeader::AsdlClass(static_cast<uint16_t>(value_e::Interrupted), 0);
|
| 324 | }
|
| 325 |
|
| 326 | DISALLOW_COPY_AND_ASSIGN(value__Interrupted)
|
| 327 | };
|
| 328 |
|
| 329 | class value__Stdin : public value_t {
|
| 330 | public:
|
| 331 | value__Stdin() {}
|
| 332 |
|
| 333 | hnode_t* PrettyTree(bool do_abbrev, Dict<int, bool>* seen = nullptr);
|
| 334 |
|
| 335 | static constexpr ObjHeader obj_header() {
|
| 336 | return ObjHeader::AsdlClass(static_cast<uint16_t>(value_e::Stdin), 0);
|
| 337 | }
|
| 338 |
|
| 339 | DISALLOW_COPY_AND_ASSIGN(value__Stdin)
|
| 340 | };
|
| 341 |
|
| 342 | class value__Slice : public value_t {
|
| 343 | public:
|
| 344 | value__Slice(IntBox* lower, IntBox* upper)
|
| 345 | : lower(lower),
|
| 346 | upper(upper) {
|
| 347 | }
|
| 348 |
|
| 349 | static value__Slice* CreateNull(bool alloc_lists = false) {
|
| 350 | return Alloc<value__Slice>(nullptr, nullptr);
|
| 351 | }
|
| 352 |
|
| 353 | hnode_t* PrettyTree(bool do_abbrev, Dict<int, bool>* seen = nullptr);
|
| 354 |
|
| 355 | static constexpr ObjHeader obj_header() {
|
| 356 | return ObjHeader::AsdlClass(static_cast<uint16_t>(value_e::Slice), 2);
|
| 357 | }
|
| 358 | IntBox* lower;
|
| 359 | IntBox* upper;
|
| 360 |
|
| 361 | DISALLOW_COPY_AND_ASSIGN(value__Slice)
|
| 362 | };
|
| 363 |
|
| 364 | class value__Undef : public value_t {
|
| 365 | public:
|
| 366 | value__Undef() {}
|
| 367 |
|
| 368 | hnode_t* PrettyTree(bool do_abbrev, Dict<int, bool>* seen = nullptr);
|
| 369 |
|
| 370 | static constexpr ObjHeader obj_header() {
|
| 371 | return ObjHeader::AsdlClass(static_cast<uint16_t>(value_e::Undef), 0);
|
| 372 | }
|
| 373 |
|
| 374 | DISALLOW_COPY_AND_ASSIGN(value__Undef)
|
| 375 | };
|
| 376 |
|
| 377 | class value__Str : public value_t {
|
| 378 | public:
|
| 379 | value__Str(BigStr* s)
|
| 380 | : s(s) {
|
| 381 | }
|
| 382 |
|
| 383 | static value__Str* CreateNull(bool alloc_lists = false) {
|
| 384 | return Alloc<value__Str>(kEmptyString);
|
| 385 | }
|
| 386 |
|
| 387 | hnode_t* PrettyTree(bool do_abbrev, Dict<int, bool>* seen = nullptr);
|
| 388 |
|
| 389 | static constexpr ObjHeader obj_header() {
|
| 390 | return ObjHeader::AsdlClass(static_cast<uint16_t>(value_e::Str), 1);
|
| 391 | }
|
| 392 | BigStr* s;
|
| 393 |
|
| 394 | DISALLOW_COPY_AND_ASSIGN(value__Str)
|
| 395 | };
|
| 396 |
|
| 397 | class value__InitializerList : public value_t {
|
| 398 | public:
|
| 399 | value__InitializerList(List<InitializerValue*>* assigns)
|
| 400 | : assigns(assigns) {
|
| 401 | }
|
| 402 |
|
| 403 | static value__InitializerList* CreateNull(bool alloc_lists = false) {
|
| 404 | return Alloc<value__InitializerList>(alloc_lists ?
|
| 405 | Alloc<List<InitializerValue*>>() :
|
| 406 | nullptr);
|
| 407 | }
|
| 408 |
|
| 409 | hnode_t* PrettyTree(bool do_abbrev, Dict<int, bool>* seen = nullptr);
|
| 410 |
|
| 411 | static constexpr ObjHeader obj_header() {
|
| 412 | return
|
| 413 | ObjHeader::AsdlClass(static_cast<uint16_t>(value_e::InitializerList), 1);
|
| 414 | }
|
| 415 | List<InitializerValue*>* assigns;
|
| 416 |
|
| 417 | DISALLOW_COPY_AND_ASSIGN(value__InitializerList)
|
| 418 | };
|
| 419 |
|
| 420 | class value__InternalStringArray : public value_t {
|
| 421 | public:
|
| 422 | value__InternalStringArray(List<BigStr*>* strs)
|
| 423 | : strs(strs) {
|
| 424 | }
|
| 425 |
|
| 426 | static value__InternalStringArray* CreateNull(bool alloc_lists = false) {
|
| 427 | return Alloc<value__InternalStringArray>(alloc_lists ?
|
| 428 | Alloc<List<BigStr*>>() : nullptr);
|
| 429 | }
|
| 430 |
|
| 431 | hnode_t* PrettyTree(bool do_abbrev, Dict<int, bool>* seen = nullptr);
|
| 432 |
|
| 433 | static constexpr ObjHeader obj_header() {
|
| 434 | return
|
| 435 | ObjHeader::AsdlClass(static_cast<uint16_t>(value_e::InternalStringArray), 1);
|
| 436 | }
|
| 437 | List<BigStr*>* strs;
|
| 438 |
|
| 439 | DISALLOW_COPY_AND_ASSIGN(value__InternalStringArray)
|
| 440 | };
|
| 441 |
|
| 442 | class value__BashArray : public value_t {
|
| 443 | public:
|
| 444 | value__BashArray(Dict<mops::BigInt, BigStr*>* d, mops::BigInt max_index)
|
| 445 | : d(d),
|
| 446 | max_index(max_index) {
|
| 447 | }
|
| 448 |
|
| 449 | static value__BashArray* CreateNull(bool alloc_lists = false) {
|
| 450 | return Alloc<value__BashArray>(nullptr, -1);
|
| 451 | }
|
| 452 |
|
| 453 | hnode_t* PrettyTree(bool do_abbrev, Dict<int, bool>* seen = nullptr);
|
| 454 |
|
| 455 | static constexpr ObjHeader obj_header() {
|
| 456 | return ObjHeader::AsdlClass(static_cast<uint16_t>(value_e::BashArray), 1);
|
| 457 | }
|
| 458 | Dict<mops::BigInt, BigStr*>* d;
|
| 459 | mops::BigInt max_index;
|
| 460 |
|
| 461 | DISALLOW_COPY_AND_ASSIGN(value__BashArray)
|
| 462 | };
|
| 463 |
|
| 464 | class value__BashAssoc : public value_t {
|
| 465 | public:
|
| 466 | value__BashAssoc(Dict<BigStr*, BigStr*>* d)
|
| 467 | : d(d) {
|
| 468 | }
|
| 469 |
|
| 470 | static value__BashAssoc* CreateNull(bool alloc_lists = false) {
|
| 471 | return Alloc<value__BashAssoc>(nullptr);
|
| 472 | }
|
| 473 |
|
| 474 | hnode_t* PrettyTree(bool do_abbrev, Dict<int, bool>* seen = nullptr);
|
| 475 |
|
| 476 | static constexpr ObjHeader obj_header() {
|
| 477 | return ObjHeader::AsdlClass(static_cast<uint16_t>(value_e::BashAssoc), 1);
|
| 478 | }
|
| 479 | Dict<BigStr*, BigStr*>* d;
|
| 480 |
|
| 481 | DISALLOW_COPY_AND_ASSIGN(value__BashAssoc)
|
| 482 | };
|
| 483 |
|
| 484 | class value__Null : public value_t {
|
| 485 | public:
|
| 486 | value__Null() {}
|
| 487 |
|
| 488 | hnode_t* PrettyTree(bool do_abbrev, Dict<int, bool>* seen = nullptr);
|
| 489 |
|
| 490 | static constexpr ObjHeader obj_header() {
|
| 491 | return ObjHeader::AsdlClass(static_cast<uint16_t>(value_e::Null), 0);
|
| 492 | }
|
| 493 |
|
| 494 | DISALLOW_COPY_AND_ASSIGN(value__Null)
|
| 495 | };
|
| 496 |
|
| 497 | class value__Bool : public value_t {
|
| 498 | public:
|
| 499 | value__Bool(bool b)
|
| 500 | : b(b) {
|
| 501 | }
|
| 502 |
|
| 503 | static value__Bool* CreateNull(bool alloc_lists = false) {
|
| 504 | return Alloc<value__Bool>(false);
|
| 505 | }
|
| 506 |
|
| 507 | hnode_t* PrettyTree(bool do_abbrev, Dict<int, bool>* seen = nullptr);
|
| 508 |
|
| 509 | static constexpr ObjHeader obj_header() {
|
| 510 | return ObjHeader::AsdlClass(static_cast<uint16_t>(value_e::Bool), 0);
|
| 511 | }
|
| 512 | bool b;
|
| 513 |
|
| 514 | DISALLOW_COPY_AND_ASSIGN(value__Bool)
|
| 515 | };
|
| 516 |
|
| 517 | class value__Int : public value_t {
|
| 518 | public:
|
| 519 | value__Int(mops::BigInt i)
|
| 520 | : i(i) {
|
| 521 | }
|
| 522 |
|
| 523 | static value__Int* CreateNull(bool alloc_lists = false) {
|
| 524 | return Alloc<value__Int>(-1);
|
| 525 | }
|
| 526 |
|
| 527 | hnode_t* PrettyTree(bool do_abbrev, Dict<int, bool>* seen = nullptr);
|
| 528 |
|
| 529 | static constexpr ObjHeader obj_header() {
|
| 530 | return ObjHeader::AsdlClass(static_cast<uint16_t>(value_e::Int), 0);
|
| 531 | }
|
| 532 | mops::BigInt i;
|
| 533 |
|
| 534 | DISALLOW_COPY_AND_ASSIGN(value__Int)
|
| 535 | };
|
| 536 |
|
| 537 | class value__Float : public value_t {
|
| 538 | public:
|
| 539 | value__Float(double f)
|
| 540 | : f(f) {
|
| 541 | }
|
| 542 |
|
| 543 | static value__Float* CreateNull(bool alloc_lists = false) {
|
| 544 | return Alloc<value__Float>(0.0);
|
| 545 | }
|
| 546 |
|
| 547 | hnode_t* PrettyTree(bool do_abbrev, Dict<int, bool>* seen = nullptr);
|
| 548 |
|
| 549 | static constexpr ObjHeader obj_header() {
|
| 550 | return ObjHeader::AsdlClass(static_cast<uint16_t>(value_e::Float), 0);
|
| 551 | }
|
| 552 | double f;
|
| 553 |
|
| 554 | DISALLOW_COPY_AND_ASSIGN(value__Float)
|
| 555 | };
|
| 556 |
|
| 557 | class value__List : public value_t {
|
| 558 | public:
|
| 559 | value__List(List<value_t*>* items)
|
| 560 | : items(items) {
|
| 561 | }
|
| 562 |
|
| 563 | static value__List* CreateNull(bool alloc_lists = false) {
|
| 564 | return Alloc<value__List>(alloc_lists ? Alloc<List<value_t*>>() : nullptr);
|
| 565 | }
|
| 566 |
|
| 567 | hnode_t* PrettyTree(bool do_abbrev, Dict<int, bool>* seen = nullptr);
|
| 568 |
|
| 569 | static constexpr ObjHeader obj_header() {
|
| 570 | return ObjHeader::AsdlClass(static_cast<uint16_t>(value_e::List), 1);
|
| 571 | }
|
| 572 | List<value_t*>* items;
|
| 573 |
|
| 574 | DISALLOW_COPY_AND_ASSIGN(value__List)
|
| 575 | };
|
| 576 |
|
| 577 | class value__Dict : public value_t {
|
| 578 | public:
|
| 579 | value__Dict(Dict<BigStr*, value_t*>* d)
|
| 580 | : d(d) {
|
| 581 | }
|
| 582 |
|
| 583 | static value__Dict* CreateNull(bool alloc_lists = false) {
|
| 584 | return Alloc<value__Dict>(nullptr);
|
| 585 | }
|
| 586 |
|
| 587 | hnode_t* PrettyTree(bool do_abbrev, Dict<int, bool>* seen = nullptr);
|
| 588 |
|
| 589 | static constexpr ObjHeader obj_header() {
|
| 590 | return ObjHeader::AsdlClass(static_cast<uint16_t>(value_e::Dict), 1);
|
| 591 | }
|
| 592 | Dict<BigStr*, value_t*>* d;
|
| 593 |
|
| 594 | DISALLOW_COPY_AND_ASSIGN(value__Dict)
|
| 595 | };
|
| 596 |
|
| 597 | class value__Range : public value_t {
|
| 598 | public:
|
| 599 | value__Range(int lower, int upper)
|
| 600 | : lower(lower),
|
| 601 | upper(upper) {
|
| 602 | }
|
| 603 |
|
| 604 | static value__Range* CreateNull(bool alloc_lists = false) {
|
| 605 | return Alloc<value__Range>(-1, -1);
|
| 606 | }
|
| 607 |
|
| 608 | hnode_t* PrettyTree(bool do_abbrev, Dict<int, bool>* seen = nullptr);
|
| 609 |
|
| 610 | static constexpr ObjHeader obj_header() {
|
| 611 | return ObjHeader::AsdlClass(static_cast<uint16_t>(value_e::Range), 0);
|
| 612 | }
|
| 613 | int lower;
|
| 614 | int upper;
|
| 615 |
|
| 616 | DISALLOW_COPY_AND_ASSIGN(value__Range)
|
| 617 | };
|
| 618 |
|
| 619 | class value__Eggex : public value_t {
|
| 620 | public:
|
| 621 | value__Eggex(syntax_asdl::re_t* spliced, BigStr* canonical_flags,
|
| 622 | List<value_t*>* convert_funcs, List<syntax_asdl::Token*>*
|
| 623 | convert_toks, BigStr* as_ere, List<BigStr*>* capture_names)
|
| 624 | : spliced(spliced),
|
| 625 | canonical_flags(canonical_flags),
|
| 626 | convert_funcs(convert_funcs),
|
| 627 | convert_toks(convert_toks),
|
| 628 | as_ere(as_ere),
|
| 629 | capture_names(capture_names) {
|
| 630 | }
|
| 631 |
|
| 632 | static value__Eggex* CreateNull(bool alloc_lists = false) {
|
| 633 | return Alloc<value__Eggex>(nullptr, kEmptyString, alloc_lists ?
|
| 634 | Alloc<List<value_t*>>() : nullptr, alloc_lists ?
|
| 635 | Alloc<List<syntax_asdl::Token*>>() : nullptr,
|
| 636 | nullptr, alloc_lists ? Alloc<List<BigStr*>>() :
|
| 637 | nullptr);
|
| 638 | }
|
| 639 |
|
| 640 | hnode_t* PrettyTree(bool do_abbrev, Dict<int, bool>* seen = nullptr);
|
| 641 |
|
| 642 | static constexpr ObjHeader obj_header() {
|
| 643 | return ObjHeader::AsdlClass(static_cast<uint16_t>(value_e::Eggex), 6);
|
| 644 | }
|
| 645 | syntax_asdl::re_t* spliced;
|
| 646 | BigStr* canonical_flags;
|
| 647 | List<value_t*>* convert_funcs;
|
| 648 | List<syntax_asdl::Token*>* convert_toks;
|
| 649 | BigStr* as_ere;
|
| 650 | List<BigStr*>* capture_names;
|
| 651 |
|
| 652 | DISALLOW_COPY_AND_ASSIGN(value__Eggex)
|
| 653 | };
|
| 654 |
|
| 655 | class value__Place : public value_t {
|
| 656 | public:
|
| 657 | value__Place(y_lvalue_t* lval, Dict<BigStr*, runtime_asdl::Cell*>* frame)
|
| 658 | : lval(lval),
|
| 659 | frame(frame) {
|
| 660 | }
|
| 661 |
|
| 662 | static value__Place* CreateNull(bool alloc_lists = false) {
|
| 663 | return Alloc<value__Place>(nullptr, nullptr);
|
| 664 | }
|
| 665 |
|
| 666 | hnode_t* PrettyTree(bool do_abbrev, Dict<int, bool>* seen = nullptr);
|
| 667 |
|
| 668 | static constexpr ObjHeader obj_header() {
|
| 669 | return ObjHeader::AsdlClass(static_cast<uint16_t>(value_e::Place), 2);
|
| 670 | }
|
| 671 | y_lvalue_t* lval;
|
| 672 | Dict<BigStr*, runtime_asdl::Cell*>* frame;
|
| 673 |
|
| 674 | DISALLOW_COPY_AND_ASSIGN(value__Place)
|
| 675 | };
|
| 676 |
|
| 677 | class value__Frame : public value_t {
|
| 678 | public:
|
| 679 | value__Frame(Dict<BigStr*, runtime_asdl::Cell*>* frame)
|
| 680 | : frame(frame) {
|
| 681 | }
|
| 682 |
|
| 683 | static value__Frame* CreateNull(bool alloc_lists = false) {
|
| 684 | return Alloc<value__Frame>(nullptr);
|
| 685 | }
|
| 686 |
|
| 687 | hnode_t* PrettyTree(bool do_abbrev, Dict<int, bool>* seen = nullptr);
|
| 688 |
|
| 689 | static constexpr ObjHeader obj_header() {
|
| 690 | return ObjHeader::AsdlClass(static_cast<uint16_t>(value_e::Frame), 1);
|
| 691 | }
|
| 692 | Dict<BigStr*, runtime_asdl::Cell*>* frame;
|
| 693 |
|
| 694 | DISALLOW_COPY_AND_ASSIGN(value__Frame)
|
| 695 | };
|
| 696 |
|
| 697 | class value__DebugFrame : public value_t {
|
| 698 | public:
|
| 699 | value__DebugFrame(syntax_asdl::debug_frame_t* frame)
|
| 700 | : frame(frame) {
|
| 701 | }
|
| 702 |
|
| 703 | static value__DebugFrame* CreateNull(bool alloc_lists = false) {
|
| 704 | return Alloc<value__DebugFrame>(nullptr);
|
| 705 | }
|
| 706 |
|
| 707 | hnode_t* PrettyTree(bool do_abbrev, Dict<int, bool>* seen = nullptr);
|
| 708 |
|
| 709 | static constexpr ObjHeader obj_header() {
|
| 710 | return ObjHeader::AsdlClass(static_cast<uint16_t>(value_e::DebugFrame), 1);
|
| 711 | }
|
| 712 | syntax_asdl::debug_frame_t* frame;
|
| 713 |
|
| 714 | DISALLOW_COPY_AND_ASSIGN(value__DebugFrame)
|
| 715 | };
|
| 716 |
|
| 717 | class value__BoundFunc : public value_t {
|
| 718 | public:
|
| 719 | value__BoundFunc(value_t* me, value_t* func)
|
| 720 | : me(me),
|
| 721 | func(func) {
|
| 722 | }
|
| 723 |
|
| 724 | static value__BoundFunc* CreateNull(bool alloc_lists = false) {
|
| 725 | return Alloc<value__BoundFunc>(nullptr, nullptr);
|
| 726 | }
|
| 727 |
|
| 728 | hnode_t* PrettyTree(bool do_abbrev, Dict<int, bool>* seen = nullptr);
|
| 729 |
|
| 730 | static constexpr ObjHeader obj_header() {
|
| 731 | return ObjHeader::AsdlClass(static_cast<uint16_t>(value_e::BoundFunc), 2);
|
| 732 | }
|
| 733 | value_t* me;
|
| 734 | value_t* func;
|
| 735 |
|
| 736 | DISALLOW_COPY_AND_ASSIGN(value__BoundFunc)
|
| 737 | };
|
| 738 |
|
| 739 | class value__BuiltinFunc : public value_t {
|
| 740 | public:
|
| 741 | value__BuiltinFunc(void* callable)
|
| 742 | : callable(callable) {
|
| 743 | }
|
| 744 |
|
| 745 | static value__BuiltinFunc* CreateNull(bool alloc_lists = false) {
|
| 746 | return Alloc<value__BuiltinFunc>(nullptr);
|
| 747 | }
|
| 748 |
|
| 749 | hnode_t* PrettyTree(bool do_abbrev, Dict<int, bool>* seen = nullptr);
|
| 750 |
|
| 751 | static constexpr ObjHeader obj_header() {
|
| 752 | return ObjHeader::AsdlClass(static_cast<uint16_t>(value_e::BuiltinFunc), 1);
|
| 753 | }
|
| 754 | void* callable;
|
| 755 |
|
| 756 | DISALLOW_COPY_AND_ASSIGN(value__BuiltinFunc)
|
| 757 | };
|
| 758 |
|
| 759 | class value__Func : public value_t {
|
| 760 | public:
|
| 761 | value__Func(BigStr* name, syntax_asdl::Func* parsed, List<value_t*>*
|
| 762 | pos_defaults, Dict<BigStr*, value_t*>* named_defaults,
|
| 763 | Dict<BigStr*, runtime_asdl::Cell*>* captured_frame, Dict<BigStr*,
|
| 764 | runtime_asdl::Cell*>* module_frame)
|
| 765 | : name(name),
|
| 766 | parsed(parsed),
|
| 767 | pos_defaults(pos_defaults),
|
| 768 | named_defaults(named_defaults),
|
| 769 | captured_frame(captured_frame),
|
| 770 | module_frame(module_frame) {
|
| 771 | }
|
| 772 |
|
| 773 | static value__Func* CreateNull(bool alloc_lists = false) {
|
| 774 | return Alloc<value__Func>(kEmptyString, nullptr, alloc_lists ?
|
| 775 | Alloc<List<value_t*>>() : nullptr, nullptr,
|
| 776 | nullptr, nullptr);
|
| 777 | }
|
| 778 |
|
| 779 | hnode_t* PrettyTree(bool do_abbrev, Dict<int, bool>* seen = nullptr);
|
| 780 |
|
| 781 | static constexpr ObjHeader obj_header() {
|
| 782 | return ObjHeader::AsdlClass(static_cast<uint16_t>(value_e::Func), 6);
|
| 783 | }
|
| 784 | BigStr* name;
|
| 785 | syntax_asdl::Func* parsed;
|
| 786 | List<value_t*>* pos_defaults;
|
| 787 | Dict<BigStr*, value_t*>* named_defaults;
|
| 788 | Dict<BigStr*, runtime_asdl::Cell*>* captured_frame;
|
| 789 | Dict<BigStr*, runtime_asdl::Cell*>* module_frame;
|
| 790 |
|
| 791 | DISALLOW_COPY_AND_ASSIGN(value__Func)
|
| 792 | };
|
| 793 |
|
| 794 | class value__BuiltinProc : public value_t {
|
| 795 | public:
|
| 796 | value__BuiltinProc(void* builtin)
|
| 797 | : builtin(builtin) {
|
| 798 | }
|
| 799 |
|
| 800 | static value__BuiltinProc* CreateNull(bool alloc_lists = false) {
|
| 801 | return Alloc<value__BuiltinProc>(nullptr);
|
| 802 | }
|
| 803 |
|
| 804 | hnode_t* PrettyTree(bool do_abbrev, Dict<int, bool>* seen = nullptr);
|
| 805 |
|
| 806 | static constexpr ObjHeader obj_header() {
|
| 807 | return ObjHeader::AsdlClass(static_cast<uint16_t>(value_e::BuiltinProc), 1);
|
| 808 | }
|
| 809 | void* builtin;
|
| 810 |
|
| 811 | DISALLOW_COPY_AND_ASSIGN(value__BuiltinProc)
|
| 812 | };
|
| 813 |
|
| 814 | class value__Proc : public value_t {
|
| 815 | public:
|
| 816 | value__Proc(BigStr* name, syntax_asdl::Token* name_tok,
|
| 817 | syntax_asdl::proc_sig_t* sig, syntax_asdl::command_t* body,
|
| 818 | ProcDefaults* defaults, bool sh_compat, Dict<BigStr*,
|
| 819 | runtime_asdl::Cell*>* captured_frame, Dict<BigStr*,
|
| 820 | runtime_asdl::Cell*>* module_frame, BigStr* code_str)
|
| 821 | : name(name),
|
| 822 | name_tok(name_tok),
|
| 823 | sig(sig),
|
| 824 | body(body),
|
| 825 | defaults(defaults),
|
| 826 | captured_frame(captured_frame),
|
| 827 | module_frame(module_frame),
|
| 828 | code_str(code_str),
|
| 829 | sh_compat(sh_compat) {
|
| 830 | }
|
| 831 |
|
| 832 | static value__Proc* CreateNull(bool alloc_lists = false) {
|
| 833 | return Alloc<value__Proc>(kEmptyString, nullptr, nullptr, nullptr, nullptr,
|
| 834 | false, nullptr, nullptr, nullptr);
|
| 835 | }
|
| 836 |
|
| 837 | hnode_t* PrettyTree(bool do_abbrev, Dict<int, bool>* seen = nullptr);
|
| 838 |
|
| 839 | static constexpr ObjHeader obj_header() {
|
| 840 | return ObjHeader::AsdlClass(static_cast<uint16_t>(value_e::Proc), 8);
|
| 841 | }
|
| 842 | BigStr* name;
|
| 843 | syntax_asdl::Token* name_tok;
|
| 844 | syntax_asdl::proc_sig_t* sig;
|
| 845 | syntax_asdl::command_t* body;
|
| 846 | ProcDefaults* defaults;
|
| 847 | Dict<BigStr*, runtime_asdl::Cell*>* captured_frame;
|
| 848 | Dict<BigStr*, runtime_asdl::Cell*>* module_frame;
|
| 849 | BigStr* code_str;
|
| 850 | bool sh_compat;
|
| 851 |
|
| 852 | DISALLOW_COPY_AND_ASSIGN(value__Proc)
|
| 853 | };
|
| 854 |
|
| 855 | class value__Expr : public value_t {
|
| 856 | public:
|
| 857 | value__Expr(syntax_asdl::expr_t* e, Dict<BigStr*, runtime_asdl::Cell*>*
|
| 858 | captured_frame, Dict<BigStr*, runtime_asdl::Cell*>* module_frame)
|
| 859 | : e(e),
|
| 860 | captured_frame(captured_frame),
|
| 861 | module_frame(module_frame) {
|
| 862 | }
|
| 863 |
|
| 864 | static value__Expr* CreateNull(bool alloc_lists = false) {
|
| 865 | return Alloc<value__Expr>(nullptr, nullptr, nullptr);
|
| 866 | }
|
| 867 |
|
| 868 | hnode_t* PrettyTree(bool do_abbrev, Dict<int, bool>* seen = nullptr);
|
| 869 |
|
| 870 | static constexpr ObjHeader obj_header() {
|
| 871 | return ObjHeader::AsdlClass(static_cast<uint16_t>(value_e::Expr), 3);
|
| 872 | }
|
| 873 | syntax_asdl::expr_t* e;
|
| 874 | Dict<BigStr*, runtime_asdl::Cell*>* captured_frame;
|
| 875 | Dict<BigStr*, runtime_asdl::Cell*>* module_frame;
|
| 876 |
|
| 877 | DISALLOW_COPY_AND_ASSIGN(value__Expr)
|
| 878 | };
|
| 879 |
|
| 880 | class value__CommandFrag : public value_t {
|
| 881 | public:
|
| 882 | value__CommandFrag(syntax_asdl::command_t* c)
|
| 883 | : c(c) {
|
| 884 | }
|
| 885 |
|
| 886 | static value__CommandFrag* CreateNull(bool alloc_lists = false) {
|
| 887 | return Alloc<value__CommandFrag>(nullptr);
|
| 888 | }
|
| 889 |
|
| 890 | hnode_t* PrettyTree(bool do_abbrev, Dict<int, bool>* seen = nullptr);
|
| 891 |
|
| 892 | static constexpr ObjHeader obj_header() {
|
| 893 | return ObjHeader::AsdlClass(static_cast<uint16_t>(value_e::CommandFrag), 1);
|
| 894 | }
|
| 895 | syntax_asdl::command_t* c;
|
| 896 |
|
| 897 | DISALLOW_COPY_AND_ASSIGN(value__CommandFrag)
|
| 898 | };
|
| 899 |
|
| 900 | class value__Command : public value_t {
|
| 901 | public:
|
| 902 | value__Command(syntax_asdl::cmd_frag_t* frag, Dict<BigStr*,
|
| 903 | runtime_asdl::Cell*>* captured_frame, Dict<BigStr*,
|
| 904 | runtime_asdl::Cell*>* module_frame)
|
| 905 | : frag(frag),
|
| 906 | captured_frame(captured_frame),
|
| 907 | module_frame(module_frame) {
|
| 908 | }
|
| 909 |
|
| 910 | static value__Command* CreateNull(bool alloc_lists = false) {
|
| 911 | return Alloc<value__Command>(nullptr, nullptr, nullptr);
|
| 912 | }
|
| 913 |
|
| 914 | hnode_t* PrettyTree(bool do_abbrev, Dict<int, bool>* seen = nullptr);
|
| 915 |
|
| 916 | static constexpr ObjHeader obj_header() {
|
| 917 | return ObjHeader::AsdlClass(static_cast<uint16_t>(value_e::Command), 3);
|
| 918 | }
|
| 919 | syntax_asdl::cmd_frag_t* frag;
|
| 920 | Dict<BigStr*, runtime_asdl::Cell*>* captured_frame;
|
| 921 | Dict<BigStr*, runtime_asdl::Cell*>* module_frame;
|
| 922 |
|
| 923 | DISALLOW_COPY_AND_ASSIGN(value__Command)
|
| 924 | };
|
| 925 |
|
| 926 | extern GcGlobal<value__Interrupted> gvalue__Interrupted;
|
| 927 | extern GcGlobal<value__Stdin> gvalue__Stdin;
|
| 928 | extern GcGlobal<value__Undef> gvalue__Undef;
|
| 929 | extern GcGlobal<value__Null> gvalue__Null;
|
| 930 | ASDL_NAMES value {
|
| 931 | static value__Interrupted* Interrupted;
|
| 932 | static value__Stdin* Stdin;
|
| 933 | typedef value__Slice Slice;
|
| 934 | static value__Undef* Undef;
|
| 935 | typedef value__Str Str;
|
| 936 | typedef value__InitializerList InitializerList;
|
| 937 | typedef value__InternalStringArray InternalStringArray;
|
| 938 | typedef value__BashArray BashArray;
|
| 939 | typedef value__BashAssoc BashAssoc;
|
| 940 | static value__Null* Null;
|
| 941 | typedef value__Bool Bool;
|
| 942 | typedef value__Int Int;
|
| 943 | typedef value__Float Float;
|
| 944 | typedef value__List List;
|
| 945 | typedef value__Dict Dict;
|
| 946 | typedef value__Range Range;
|
| 947 | typedef value__Eggex Eggex;
|
| 948 | typedef value__Place Place;
|
| 949 | typedef value__Frame Frame;
|
| 950 | typedef value__DebugFrame DebugFrame;
|
| 951 | typedef value__BoundFunc BoundFunc;
|
| 952 | typedef value__BuiltinFunc BuiltinFunc;
|
| 953 | typedef value__Func Func;
|
| 954 | typedef value__BuiltinProc BuiltinProc;
|
| 955 | typedef value__Proc Proc;
|
| 956 | typedef value__Expr Expr;
|
| 957 | typedef value__CommandFrag CommandFrag;
|
| 958 | typedef value__Command Command;
|
| 959 | };
|
| 960 |
|
| 961 | class IntBox {
|
| 962 | public:
|
| 963 | IntBox(int i)
|
| 964 | : i(i) {
|
| 965 | }
|
| 966 |
|
| 967 | static IntBox* CreateNull(bool alloc_lists = false) {
|
| 968 | return Alloc<IntBox>(-1);
|
| 969 | }
|
| 970 |
|
| 971 | hnode_t* PrettyTree(bool do_abbrev, Dict<int, bool>* seen = nullptr);
|
| 972 |
|
| 973 | static constexpr ObjHeader obj_header() {
|
| 974 | return ObjHeader::AsdlClass(64, 0);
|
| 975 | }
|
| 976 | int i;
|
| 977 |
|
| 978 | DISALLOW_COPY_AND_ASSIGN(IntBox)
|
| 979 | };
|
| 980 |
|
| 981 | class InitializerValue {
|
| 982 | public:
|
| 983 | InitializerValue(BigStr* key, BigStr* rval, bool plus_eq)
|
| 984 | : key(key),
|
| 985 | rval(rval),
|
| 986 | plus_eq(plus_eq) {
|
| 987 | }
|
| 988 |
|
| 989 | static InitializerValue* CreateNull(bool alloc_lists = false) {
|
| 990 | return Alloc<InitializerValue>(nullptr, kEmptyString, false);
|
| 991 | }
|
| 992 |
|
| 993 | hnode_t* PrettyTree(bool do_abbrev, Dict<int, bool>* seen = nullptr);
|
| 994 |
|
| 995 | static constexpr ObjHeader obj_header() {
|
| 996 | return ObjHeader::AsdlClass(65, 2);
|
| 997 | }
|
| 998 | BigStr* key;
|
| 999 | BigStr* rval;
|
| 1000 | bool plus_eq;
|
| 1001 |
|
| 1002 | DISALLOW_COPY_AND_ASSIGN(InitializerValue)
|
| 1003 | };
|
| 1004 |
|
| 1005 | class ProcDefaults {
|
| 1006 | public:
|
| 1007 | ProcDefaults(List<value_t*>* for_word, List<value_t*>* for_typed,
|
| 1008 | Dict<BigStr*, value_t*>* for_named, value_t* for_block)
|
| 1009 | : for_word(for_word),
|
| 1010 | for_typed(for_typed),
|
| 1011 | for_named(for_named),
|
| 1012 | for_block(for_block) {
|
| 1013 | }
|
| 1014 |
|
| 1015 | static ProcDefaults* CreateNull(bool alloc_lists = false) {
|
| 1016 | return Alloc<ProcDefaults>(nullptr, nullptr, nullptr, nullptr);
|
| 1017 | }
|
| 1018 |
|
| 1019 | hnode_t* PrettyTree(bool do_abbrev, Dict<int, bool>* seen = nullptr);
|
| 1020 |
|
| 1021 | static constexpr ObjHeader obj_header() {
|
| 1022 | return ObjHeader::AsdlClass(66, 4);
|
| 1023 | }
|
| 1024 | List<value_t*>* for_word;
|
| 1025 | List<value_t*>* for_typed;
|
| 1026 | Dict<BigStr*, value_t*>* for_named;
|
| 1027 | value_t* for_block;
|
| 1028 |
|
| 1029 | DISALLOW_COPY_AND_ASSIGN(ProcDefaults)
|
| 1030 | };
|
| 1031 |
|
| 1032 | class LeftName : public y_lvalue_t, public sh_lvalue_t {
|
| 1033 | public:
|
| 1034 | LeftName(BigStr* name, syntax_asdl::loc_t* blame_loc)
|
| 1035 | : name(name),
|
| 1036 | blame_loc(blame_loc) {
|
| 1037 | }
|
| 1038 |
|
| 1039 | static LeftName* CreateNull(bool alloc_lists = false) {
|
| 1040 | return Alloc<LeftName>(kEmptyString, nullptr);
|
| 1041 | }
|
| 1042 |
|
| 1043 | hnode_t* PrettyTree(bool do_abbrev, Dict<int, bool>* seen = nullptr);
|
| 1044 |
|
| 1045 | static constexpr ObjHeader obj_header() {
|
| 1046 | return ObjHeader::AsdlClass(67, 2);
|
| 1047 | }
|
| 1048 | BigStr* name;
|
| 1049 | syntax_asdl::loc_t* blame_loc;
|
| 1050 |
|
| 1051 | DISALLOW_COPY_AND_ASSIGN(LeftName)
|
| 1052 | };
|
| 1053 |
|
| 1054 | class RegexMatch : public regex_match_t, public value_t {
|
| 1055 | public:
|
| 1056 | RegexMatch(BigStr* s, List<int>* indices, eggex_ops_t* ops)
|
| 1057 | : s(s),
|
| 1058 | indices(indices),
|
| 1059 | ops(ops) {
|
| 1060 | }
|
| 1061 |
|
| 1062 | static RegexMatch* CreateNull(bool alloc_lists = false) {
|
| 1063 | return Alloc<RegexMatch>(kEmptyString, alloc_lists ? Alloc<List<int>>() :
|
| 1064 | nullptr, nullptr);
|
| 1065 | }
|
| 1066 |
|
| 1067 | hnode_t* PrettyTree(bool do_abbrev, Dict<int, bool>* seen = nullptr);
|
| 1068 |
|
| 1069 | static constexpr ObjHeader obj_header() {
|
| 1070 | return ObjHeader::AsdlClass(68, 3);
|
| 1071 | }
|
| 1072 | BigStr* s;
|
| 1073 | List<int>* indices;
|
| 1074 | eggex_ops_t* ops;
|
| 1075 |
|
| 1076 | DISALLOW_COPY_AND_ASSIGN(RegexMatch)
|
| 1077 | };
|
| 1078 |
|
| 1079 | class Obj : public value_t {
|
| 1080 | public:
|
| 1081 | Obj(Obj* prototype, Dict<BigStr*, value_t*>* d)
|
| 1082 | : prototype(prototype),
|
| 1083 | d(d) {
|
| 1084 | }
|
| 1085 |
|
| 1086 | static Obj* CreateNull(bool alloc_lists = false) {
|
| 1087 | return Alloc<Obj>(nullptr, nullptr);
|
| 1088 | }
|
| 1089 |
|
| 1090 | hnode_t* PrettyTree(bool do_abbrev, Dict<int, bool>* seen = nullptr);
|
| 1091 |
|
| 1092 | static constexpr ObjHeader obj_header() {
|
| 1093 | return ObjHeader::AsdlClass(69, 2);
|
| 1094 | }
|
| 1095 | Obj* prototype;
|
| 1096 | Dict<BigStr*, value_t*>* d;
|
| 1097 |
|
| 1098 | DISALLOW_COPY_AND_ASSIGN(Obj)
|
| 1099 | };
|
| 1100 |
|
| 1101 |
|
| 1102 | } // namespace value_asdl
|
| 1103 |
|
| 1104 | #endif // VALUE_ASDL
|