astnodes_theirs.js 33 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140
  1. /* File automatically generated by ./asdl_js.py. */
  2. /* ----- expr_context ----- */
  3. /** @constructor */
  4. function Load() {}
  5. /** @constructor */
  6. function Store() {}
  7. /** @constructor */
  8. function Del() {}
  9. /** @constructor */
  10. function AugLoad() {}
  11. /** @constructor */
  12. function AugStore() {}
  13. /** @constructor */
  14. function Param() {}
  15. /* ----- boolop ----- */
  16. /** @constructor */
  17. function And() {}
  18. /** @constructor */
  19. function Or() {}
  20. /* ----- operator ----- */
  21. /** @constructor */
  22. function Add() {}
  23. /** @constructor */
  24. function Sub() {}
  25. /** @constructor */
  26. function Mult() {}
  27. /** @constructor */
  28. function Div() {}
  29. /** @constructor */
  30. function Mod() {}
  31. /** @constructor */
  32. function Pow() {}
  33. /** @constructor */
  34. function LShift() {}
  35. /** @constructor */
  36. function RShift() {}
  37. /** @constructor */
  38. function BitOr() {}
  39. /** @constructor */
  40. function BitXor() {}
  41. /** @constructor */
  42. function BitAnd() {}
  43. /** @constructor */
  44. function FloorDiv() {}
  45. /* ----- unaryop ----- */
  46. /** @constructor */
  47. function Invert() {}
  48. /** @constructor */
  49. function Not() {}
  50. /** @constructor */
  51. function UAdd() {}
  52. /** @constructor */
  53. function USub() {}
  54. /* ----- cmpop ----- */
  55. /** @constructor */
  56. function Eq() {}
  57. /** @constructor */
  58. function NotEq() {}
  59. /** @constructor */
  60. function Lt() {}
  61. /** @constructor */
  62. function LtE() {}
  63. /** @constructor */
  64. function Gt() {}
  65. /** @constructor */
  66. function GtE() {}
  67. /** @constructor */
  68. function Is() {}
  69. /** @constructor */
  70. function IsNot() {}
  71. /** @constructor */
  72. function In_() {}
  73. /** @constructor */
  74. function NotIn() {}
  75. /* ---------------------- */
  76. /* constructors for nodes */
  77. /* ---------------------- */
  78. /** @constructor */
  79. function Module(/* {asdl_seq *} */ body)
  80. {
  81. this.body = body;
  82. return this;
  83. }
  84. /** @constructor */
  85. function Interactive(/* {asdl_seq *} */ body)
  86. {
  87. this.body = body;
  88. return this;
  89. }
  90. /** @constructor */
  91. function Expression(/* {expr_ty} */ body)
  92. {
  93. goog.asserts.assert(body !== null && body !== undefined);
  94. this.body = body;
  95. return this;
  96. }
  97. /** @constructor */
  98. function Suite(/* {asdl_seq *} */ body)
  99. {
  100. this.body = body;
  101. return this;
  102. }
  103. /** @constructor */
  104. function FunctionDef(/* {identifier} */ name, /* {arguments__ty} */ args, /*
  105. {asdl_seq *} */ body, /* {asdl_seq *} */
  106. decorator_list, /* {int} */ lineno, /* {int} */
  107. col_offset)
  108. {
  109. goog.asserts.assert(name !== null && name !== undefined);
  110. goog.asserts.assert(args !== null && args !== undefined);
  111. this.name = name;
  112. this.args = args;
  113. this.body = body;
  114. this.decorator_list = decorator_list;
  115. this.lineno = lineno;
  116. this.col_offset = col_offset;
  117. return this;
  118. }
  119. /** @constructor */
  120. function ClassDef(/* {identifier} */ name, /* {asdl_seq *} */ bases, /*
  121. {asdl_seq *} */ body, /* {asdl_seq *} */ decorator_list,
  122. /* {int} */ lineno, /* {int} */ col_offset)
  123. {
  124. goog.asserts.assert(name !== null && name !== undefined);
  125. this.name = name;
  126. this.bases = bases;
  127. this.body = body;
  128. this.decorator_list = decorator_list;
  129. this.lineno = lineno;
  130. this.col_offset = col_offset;
  131. return this;
  132. }
  133. /** @constructor */
  134. function Return_(/* {expr_ty} */ value, /* {int} */ lineno, /* {int} */
  135. col_offset)
  136. {
  137. this.value = value;
  138. this.lineno = lineno;
  139. this.col_offset = col_offset;
  140. return this;
  141. }
  142. /** @constructor */
  143. function Delete_(/* {asdl_seq *} */ targets, /* {int} */ lineno, /* {int} */
  144. col_offset)
  145. {
  146. this.targets = targets;
  147. this.lineno = lineno;
  148. this.col_offset = col_offset;
  149. return this;
  150. }
  151. /** @constructor */
  152. function Assign(/* {asdl_seq *} */ targets, /* {expr_ty} */ value, /* {int} */
  153. lineno, /* {int} */ col_offset)
  154. {
  155. goog.asserts.assert(value !== null && value !== undefined);
  156. this.targets = targets;
  157. this.value = value;
  158. this.lineno = lineno;
  159. this.col_offset = col_offset;
  160. return this;
  161. }
  162. /** @constructor */
  163. function AugAssign(/* {expr_ty} */ target, /* {operator_ty} */ op, /* {expr_ty}
  164. */ value, /* {int} */ lineno, /* {int} */ col_offset)
  165. {
  166. goog.asserts.assert(target !== null && target !== undefined);
  167. goog.asserts.assert(op !== null && op !== undefined);
  168. goog.asserts.assert(value !== null && value !== undefined);
  169. this.target = target;
  170. this.op = op;
  171. this.value = value;
  172. this.lineno = lineno;
  173. this.col_offset = col_offset;
  174. return this;
  175. }
  176. /** @constructor */
  177. function Print(/* {expr_ty} */ dest, /* {asdl_seq *} */ values, /* {bool} */
  178. nl, /* {int} */ lineno, /* {int} */ col_offset)
  179. {
  180. this.dest = dest;
  181. this.values = values;
  182. this.nl = nl;
  183. this.lineno = lineno;
  184. this.col_offset = col_offset;
  185. return this;
  186. }
  187. /** @constructor */
  188. function For_(/* {expr_ty} */ target, /* {expr_ty} */ iter, /* {asdl_seq *} */
  189. body, /* {asdl_seq *} */ orelse, /* {int} */ lineno, /*
  190. {int} */ col_offset)
  191. {
  192. goog.asserts.assert(target !== null && target !== undefined);
  193. goog.asserts.assert(iter !== null && iter !== undefined);
  194. this.target = target;
  195. this.iter = iter;
  196. this.body = body;
  197. this.orelse = orelse;
  198. this.lineno = lineno;
  199. this.col_offset = col_offset;
  200. return this;
  201. }
  202. /** @constructor */
  203. function While_(/* {expr_ty} */ test, /* {asdl_seq *} */ body, /* {asdl_seq *}
  204. */ orelse, /* {int} */ lineno, /* {int} */ col_offset)
  205. {
  206. goog.asserts.assert(test !== null && test !== undefined);
  207. this.test = test;
  208. this.body = body;
  209. this.orelse = orelse;
  210. this.lineno = lineno;
  211. this.col_offset = col_offset;
  212. return this;
  213. }
  214. /** @constructor */
  215. function If_(/* {expr_ty} */ test, /* {asdl_seq *} */ body, /* {asdl_seq *} */
  216. orelse, /* {int} */ lineno, /* {int} */ col_offset)
  217. {
  218. goog.asserts.assert(test !== null && test !== undefined);
  219. this.test = test;
  220. this.body = body;
  221. this.orelse = orelse;
  222. this.lineno = lineno;
  223. this.col_offset = col_offset;
  224. return this;
  225. }
  226. /** @constructor */
  227. function With_(/* {expr_ty} */ context_expr, /* {expr_ty} */ optional_vars, /*
  228. {asdl_seq *} */ body, /* {int} */ lineno, /* {int} */
  229. col_offset)
  230. {
  231. goog.asserts.assert(context_expr !== null && context_expr !== undefined);
  232. this.context_expr = context_expr;
  233. this.optional_vars = optional_vars;
  234. this.body = body;
  235. this.lineno = lineno;
  236. this.col_offset = col_offset;
  237. return this;
  238. }
  239. /** @constructor */
  240. function Raise(/* {expr_ty} */ type, /* {expr_ty} */ inst, /* {expr_ty} */
  241. tback, /* {int} */ lineno, /* {int} */ col_offset)
  242. {
  243. this.type = type;
  244. this.inst = inst;
  245. this.tback = tback;
  246. this.lineno = lineno;
  247. this.col_offset = col_offset;
  248. return this;
  249. }
  250. /** @constructor */
  251. function TryExcept(/* {asdl_seq *} */ body, /* {asdl_seq *} */ handlers, /*
  252. {asdl_seq *} */ orelse, /* {int} */ lineno, /* {int} */
  253. col_offset)
  254. {
  255. this.body = body;
  256. this.handlers = handlers;
  257. this.orelse = orelse;
  258. this.lineno = lineno;
  259. this.col_offset = col_offset;
  260. return this;
  261. }
  262. /** @constructor */
  263. function TryFinally(/* {asdl_seq *} */ body, /* {asdl_seq *} */ finalbody, /*
  264. {int} */ lineno, /* {int} */ col_offset)
  265. {
  266. this.body = body;
  267. this.finalbody = finalbody;
  268. this.lineno = lineno;
  269. this.col_offset = col_offset;
  270. return this;
  271. }
  272. /** @constructor */
  273. function Assert(/* {expr_ty} */ test, /* {expr_ty} */ msg, /* {int} */ lineno,
  274. /* {int} */ col_offset)
  275. {
  276. goog.asserts.assert(test !== null && test !== undefined);
  277. this.test = test;
  278. this.msg = msg;
  279. this.lineno = lineno;
  280. this.col_offset = col_offset;
  281. return this;
  282. }
  283. /** @constructor */
  284. function Import_(/* {asdl_seq *} */ names, /* {int} */ lineno, /* {int} */
  285. col_offset)
  286. {
  287. this.names = names;
  288. this.lineno = lineno;
  289. this.col_offset = col_offset;
  290. return this;
  291. }
  292. /** @constructor */
  293. function ImportFrom(/* {identifier} */ module, /* {asdl_seq *} */ names, /*
  294. {int} */ level, /* {int} */ lineno, /* {int} */
  295. col_offset)
  296. {
  297. goog.asserts.assert(module !== null && module !== undefined);
  298. this.module = module;
  299. this.names = names;
  300. this.level = level;
  301. this.lineno = lineno;
  302. this.col_offset = col_offset;
  303. return this;
  304. }
  305. /** @constructor */
  306. function Exec(/* {expr_ty} */ body, /* {expr_ty} */ globals, /* {expr_ty} */
  307. locals, /* {int} */ lineno, /* {int} */ col_offset)
  308. {
  309. goog.asserts.assert(body !== null && body !== undefined);
  310. this.body = body;
  311. this.globals = globals;
  312. this.locals = locals;
  313. this.lineno = lineno;
  314. this.col_offset = col_offset;
  315. return this;
  316. }
  317. /** @constructor */
  318. function Global(/* {asdl_seq *} */ names, /* {int} */ lineno, /* {int} */
  319. col_offset)
  320. {
  321. this.names = names;
  322. this.lineno = lineno;
  323. this.col_offset = col_offset;
  324. return this;
  325. }
  326. /** @constructor */
  327. function Expr(/* {expr_ty} */ value, /* {int} */ lineno, /* {int} */ col_offset)
  328. {
  329. goog.asserts.assert(value !== null && value !== undefined);
  330. this.value = value;
  331. this.lineno = lineno;
  332. this.col_offset = col_offset;
  333. return this;
  334. }
  335. /** @constructor */
  336. function Pass(/* {int} */ lineno, /* {int} */ col_offset)
  337. {
  338. this.lineno = lineno;
  339. this.col_offset = col_offset;
  340. return this;
  341. }
  342. /** @constructor */
  343. function Break_(/* {int} */ lineno, /* {int} */ col_offset)
  344. {
  345. this.lineno = lineno;
  346. this.col_offset = col_offset;
  347. return this;
  348. }
  349. /** @constructor */
  350. function Continue_(/* {int} */ lineno, /* {int} */ col_offset)
  351. {
  352. this.lineno = lineno;
  353. this.col_offset = col_offset;
  354. return this;
  355. }
  356. /** @constructor */
  357. function Debugger_(/* {int} */ lineno, /* {int} */ col_offset)
  358. {
  359. this.lineno = lineno;
  360. this.col_offset = col_offset;
  361. return this;
  362. }
  363. /** @constructor */
  364. function BoolOp(/* {boolop_ty} */ op, /* {asdl_seq *} */ values, /* {int} */
  365. lineno, /* {int} */ col_offset)
  366. {
  367. goog.asserts.assert(op !== null && op !== undefined);
  368. this.op = op;
  369. this.values = values;
  370. this.lineno = lineno;
  371. this.col_offset = col_offset;
  372. return this;
  373. }
  374. /** @constructor */
  375. function BinOp(/* {expr_ty} */ left, /* {operator_ty} */ op, /* {expr_ty} */
  376. right, /* {int} */ lineno, /* {int} */ col_offset)
  377. {
  378. goog.asserts.assert(left !== null && left !== undefined);
  379. goog.asserts.assert(op !== null && op !== undefined);
  380. goog.asserts.assert(right !== null && right !== undefined);
  381. this.left = left;
  382. this.op = op;
  383. this.right = right;
  384. this.lineno = lineno;
  385. this.col_offset = col_offset;
  386. return this;
  387. }
  388. /** @constructor */
  389. function UnaryOp(/* {unaryop_ty} */ op, /* {expr_ty} */ operand, /* {int} */
  390. lineno, /* {int} */ col_offset)
  391. {
  392. goog.asserts.assert(op !== null && op !== undefined);
  393. goog.asserts.assert(operand !== null && operand !== undefined);
  394. this.op = op;
  395. this.operand = operand;
  396. this.lineno = lineno;
  397. this.col_offset = col_offset;
  398. return this;
  399. }
  400. /** @constructor */
  401. function Lambda(/* {arguments__ty} */ args, /* {expr_ty} */ body, /* {int} */
  402. lineno, /* {int} */ col_offset)
  403. {
  404. goog.asserts.assert(args !== null && args !== undefined);
  405. goog.asserts.assert(body !== null && body !== undefined);
  406. this.args = args;
  407. this.body = body;
  408. this.lineno = lineno;
  409. this.col_offset = col_offset;
  410. return this;
  411. }
  412. /** @constructor */
  413. function IfExp(/* {expr_ty} */ test, /* {expr_ty} */ body, /* {expr_ty} */
  414. orelse, /* {int} */ lineno, /* {int} */ col_offset)
  415. {
  416. goog.asserts.assert(test !== null && test !== undefined);
  417. goog.asserts.assert(body !== null && body !== undefined);
  418. goog.asserts.assert(orelse !== null && orelse !== undefined);
  419. this.test = test;
  420. this.body = body;
  421. this.orelse = orelse;
  422. this.lineno = lineno;
  423. this.col_offset = col_offset;
  424. return this;
  425. }
  426. /** @constructor */
  427. function Dict(/* {asdl_seq *} */ keys, /* {asdl_seq *} */ values, /* {int} */
  428. lineno, /* {int} */ col_offset)
  429. {
  430. this.keys = keys;
  431. this.values = values;
  432. this.lineno = lineno;
  433. this.col_offset = col_offset;
  434. return this;
  435. }
  436. /** @constructor */
  437. function Set(/* {asdl_seq *} */ elts, /* {int} */ lineno, /* {int} */
  438. col_offset)
  439. {
  440. this.elts = elts;
  441. this.lineno = lineno;
  442. this.col_offset = col_offset;
  443. return this;
  444. }
  445. /** @constructor */
  446. function ListComp(/* {expr_ty} */ elt, /* {asdl_seq *} */ generators, /* {int}
  447. */ lineno, /* {int} */ col_offset)
  448. {
  449. goog.asserts.assert(elt !== null && elt !== undefined);
  450. this.elt = elt;
  451. this.generators = generators;
  452. this.lineno = lineno;
  453. this.col_offset = col_offset;
  454. return this;
  455. }
  456. /** @constructor */
  457. function SetComp(/* {expr_ty} */ elt, /* {asdl_seq *} */ generators, /* {int}
  458. */ lineno, /* {int} */ col_offset)
  459. {
  460. goog.asserts.assert(elt !== null && elt !== undefined);
  461. this.elt = elt;
  462. this.generators = generators;
  463. this.lineno = lineno;
  464. this.col_offset = col_offset;
  465. return this;
  466. }
  467. /** @constructor */
  468. function DictComp(/* {expr_ty} */ key, /* {expr_ty} */ value, /* {asdl_seq *}
  469. */ generators, /* {int} */ lineno, /* {int} */
  470. col_offset)
  471. {
  472. goog.asserts.assert(key !== null && key !== undefined);
  473. goog.asserts.assert(value !== null && value !== undefined);
  474. this.key = key;
  475. this.value = value;
  476. this.generators = generators;
  477. this.lineno = lineno;
  478. this.col_offset = col_offset;
  479. return this;
  480. }
  481. /** @constructor */
  482. function GeneratorExp(/* {expr_ty} */ elt, /* {asdl_seq *} */ generators, /*
  483. {int} */ lineno, /* {int} */ col_offset)
  484. {
  485. goog.asserts.assert(elt !== null && elt !== undefined);
  486. this.elt = elt;
  487. this.generators = generators;
  488. this.lineno = lineno;
  489. this.col_offset = col_offset;
  490. return this;
  491. }
  492. /** @constructor */
  493. function Yield(/* {expr_ty} */ value, /* {int} */ lineno, /* {int} */
  494. col_offset)
  495. {
  496. this.value = value;
  497. this.lineno = lineno;
  498. this.col_offset = col_offset;
  499. return this;
  500. }
  501. /** @constructor */
  502. function Compare(/* {expr_ty} */ left, /* {asdl_int_seq *} */ ops, /* {asdl_seq
  503. *} */ comparators, /* {int} */ lineno, /* {int} */
  504. col_offset)
  505. {
  506. goog.asserts.assert(left !== null && left !== undefined);
  507. this.left = left;
  508. this.ops = ops;
  509. this.comparators = comparators;
  510. this.lineno = lineno;
  511. this.col_offset = col_offset;
  512. return this;
  513. }
  514. /** @constructor */
  515. function Call(/* {expr_ty} */ func, /* {asdl_seq *} */ args, /* {asdl_seq *} */
  516. keywords, /* {expr_ty} */ starargs, /* {expr_ty} */ kwargs,
  517. /* {int} */ lineno, /* {int} */ col_offset)
  518. {
  519. goog.asserts.assert(func !== null && func !== undefined);
  520. this.func = func;
  521. this.args = args;
  522. this.keywords = keywords;
  523. this.starargs = starargs;
  524. this.kwargs = kwargs;
  525. this.lineno = lineno;
  526. this.col_offset = col_offset;
  527. return this;
  528. }
  529. /** @constructor */
  530. function Repr(/* {expr_ty} */ value, /* {int} */ lineno, /* {int} */ col_offset)
  531. {
  532. goog.asserts.assert(value !== null && value !== undefined);
  533. this.value = value;
  534. this.lineno = lineno;
  535. this.col_offset = col_offset;
  536. return this;
  537. }
  538. /** @constructor */
  539. function Num(/* {object} */ n, /* {int} */ lineno, /* {int} */ col_offset)
  540. {
  541. goog.asserts.assert(n !== null && n !== undefined);
  542. this.n = n;
  543. this.lineno = lineno;
  544. this.col_offset = col_offset;
  545. return this;
  546. }
  547. /** @constructor */
  548. function Str(/* {string} */ s, /* {int} */ lineno, /* {int} */ col_offset)
  549. {
  550. goog.asserts.assert(s !== null && s !== undefined);
  551. this.s = s;
  552. this.lineno = lineno;
  553. this.col_offset = col_offset;
  554. return this;
  555. }
  556. /** @constructor */
  557. function Attribute(/* {expr_ty} */ value, /* {identifier} */ attr, /*
  558. {expr_context_ty} */ ctx, /* {int} */ lineno, /* {int}
  559. */ col_offset)
  560. {
  561. goog.asserts.assert(value !== null && value !== undefined);
  562. goog.asserts.assert(attr !== null && attr !== undefined);
  563. goog.asserts.assert(ctx !== null && ctx !== undefined);
  564. this.value = value;
  565. this.attr = attr;
  566. this.ctx = ctx;
  567. this.lineno = lineno;
  568. this.col_offset = col_offset;
  569. return this;
  570. }
  571. /** @constructor */
  572. function Subscript(/* {expr_ty} */ value, /* {slice_ty} */ slice, /*
  573. {expr_context_ty} */ ctx, /* {int} */ lineno, /* {int}
  574. */ col_offset)
  575. {
  576. goog.asserts.assert(value !== null && value !== undefined);
  577. goog.asserts.assert(slice !== null && slice !== undefined);
  578. goog.asserts.assert(ctx !== null && ctx !== undefined);
  579. this.value = value;
  580. this.slice = slice;
  581. this.ctx = ctx;
  582. this.lineno = lineno;
  583. this.col_offset = col_offset;
  584. return this;
  585. }
  586. /** @constructor */
  587. function Name(/* {identifier} */ id, /* {expr_context_ty} */ ctx, /* {int} */
  588. lineno, /* {int} */ col_offset)
  589. {
  590. goog.asserts.assert(id !== null && id !== undefined);
  591. goog.asserts.assert(ctx !== null && ctx !== undefined);
  592. this.id = id;
  593. this.ctx = ctx;
  594. this.lineno = lineno;
  595. this.col_offset = col_offset;
  596. return this;
  597. }
  598. /** @constructor */
  599. function List(/* {asdl_seq *} */ elts, /* {expr_context_ty} */ ctx, /* {int} */
  600. lineno, /* {int} */ col_offset)
  601. {
  602. goog.asserts.assert(ctx !== null && ctx !== undefined);
  603. this.elts = elts;
  604. this.ctx = ctx;
  605. this.lineno = lineno;
  606. this.col_offset = col_offset;
  607. return this;
  608. }
  609. /** @constructor */
  610. function Tuple(/* {asdl_seq *} */ elts, /* {expr_context_ty} */ ctx, /* {int}
  611. */ lineno, /* {int} */ col_offset)
  612. {
  613. goog.asserts.assert(ctx !== null && ctx !== undefined);
  614. this.elts = elts;
  615. this.ctx = ctx;
  616. this.lineno = lineno;
  617. this.col_offset = col_offset;
  618. return this;
  619. }
  620. /** @constructor */
  621. function Ellipsis()
  622. {
  623. return this;
  624. }
  625. /** @constructor */
  626. function Slice(/* {expr_ty} */ lower, /* {expr_ty} */ upper, /* {expr_ty} */
  627. step)
  628. {
  629. this.lower = lower;
  630. this.upper = upper;
  631. this.step = step;
  632. return this;
  633. }
  634. /** @constructor */
  635. function ExtSlice(/* {asdl_seq *} */ dims)
  636. {
  637. this.dims = dims;
  638. return this;
  639. }
  640. /** @constructor */
  641. function Index(/* {expr_ty} */ value)
  642. {
  643. goog.asserts.assert(value !== null && value !== undefined);
  644. this.value = value;
  645. return this;
  646. }
  647. /** @constructor */
  648. function comprehension(/* {expr_ty} */ target, /* {expr_ty} */ iter, /*
  649. {asdl_seq *} */ ifs)
  650. {
  651. goog.asserts.assert(target !== null && target !== undefined);
  652. goog.asserts.assert(iter !== null && iter !== undefined);
  653. this.target = target;
  654. this.iter = iter;
  655. this.ifs = ifs;
  656. return this;
  657. }
  658. /** @constructor */
  659. function ExceptHandler(/* {expr_ty} */ type, /* {expr_ty} */ name, /* {asdl_seq
  660. *} */ body, /* {int} */ lineno, /* {int} */
  661. col_offset)
  662. {
  663. this.type = type;
  664. this.name = name;
  665. this.body = body;
  666. this.lineno = lineno;
  667. this.col_offset = col_offset;
  668. return this;
  669. }
  670. /** @constructor */
  671. function arguments_(/* {asdl_seq *} */ args, /* {identifier} */ vararg, /*
  672. {identifier} */ kwarg, /* {asdl_seq *} */ defaults)
  673. {
  674. this.args = args;
  675. this.vararg = vararg;
  676. this.kwarg = kwarg;
  677. this.defaults = defaults;
  678. return this;
  679. }
  680. /** @constructor */
  681. function keyword(/* {identifier} */ arg, /* {expr_ty} */ value)
  682. {
  683. goog.asserts.assert(arg !== null && arg !== undefined);
  684. goog.asserts.assert(value !== null && value !== undefined);
  685. this.arg = arg;
  686. this.value = value;
  687. return this;
  688. }
  689. /** @constructor */
  690. function alias(/* {identifier} */ name, /* {identifier} */ asname)
  691. {
  692. goog.asserts.assert(name !== null && name !== undefined);
  693. this.name = name;
  694. this.asname = asname;
  695. return this;
  696. }
  697. Module.prototype._astname = "Module";
  698. Module.prototype._fields = [
  699. "body", function(n) { return n.body; }
  700. ];
  701. Interactive.prototype._astname = "Interactive";
  702. Interactive.prototype._fields = [
  703. "body", function(n) { return n.body; }
  704. ];
  705. Expression.prototype._astname = "Expression";
  706. Expression.prototype._fields = [
  707. "body", function(n) { return n.body; }
  708. ];
  709. Suite.prototype._astname = "Suite";
  710. Suite.prototype._fields = [
  711. "body", function(n) { return n.body; }
  712. ];
  713. FunctionDef.prototype._astname = "FunctionDef";
  714. FunctionDef.prototype._fields = [
  715. "name", function(n) { return n.name; },
  716. "args", function(n) { return n.args; },
  717. "body", function(n) { return n.body; },
  718. "decorator_list", function(n) { return n.decorator_list; }
  719. ];
  720. ClassDef.prototype._astname = "ClassDef";
  721. ClassDef.prototype._fields = [
  722. "name", function(n) { return n.name; },
  723. "bases", function(n) { return n.bases; },
  724. "body", function(n) { return n.body; },
  725. "decorator_list", function(n) { return n.decorator_list; }
  726. ];
  727. Return_.prototype._astname = "Return";
  728. Return_.prototype._fields = [
  729. "value", function(n) { return n.value; }
  730. ];
  731. Delete_.prototype._astname = "Delete";
  732. Delete_.prototype._fields = [
  733. "targets", function(n) { return n.targets; }
  734. ];
  735. Assign.prototype._astname = "Assign";
  736. Assign.prototype._fields = [
  737. "targets", function(n) { return n.targets; },
  738. "value", function(n) { return n.value; }
  739. ];
  740. AugAssign.prototype._astname = "AugAssign";
  741. AugAssign.prototype._fields = [
  742. "target", function(n) { return n.target; },
  743. "op", function(n) { return n.op; },
  744. "value", function(n) { return n.value; }
  745. ];
  746. Print.prototype._astname = "Print";
  747. Print.prototype._fields = [
  748. "dest", function(n) { return n.dest; },
  749. "values", function(n) { return n.values; },
  750. "nl", function(n) { return n.nl; }
  751. ];
  752. For_.prototype._astname = "For";
  753. For_.prototype._fields = [
  754. "target", function(n) { return n.target; },
  755. "iter", function(n) { return n.iter; },
  756. "body", function(n) { return n.body; },
  757. "orelse", function(n) { return n.orelse; }
  758. ];
  759. While_.prototype._astname = "While";
  760. While_.prototype._fields = [
  761. "test", function(n) { return n.test; },
  762. "body", function(n) { return n.body; },
  763. "orelse", function(n) { return n.orelse; }
  764. ];
  765. If_.prototype._astname = "If";
  766. If_.prototype._fields = [
  767. "test", function(n) { return n.test; },
  768. "body", function(n) { return n.body; },
  769. "orelse", function(n) { return n.orelse; }
  770. ];
  771. With_.prototype._astname = "With";
  772. With_.prototype._fields = [
  773. "context_expr", function(n) { return n.context_expr; },
  774. "optional_vars", function(n) { return n.optional_vars; },
  775. "body", function(n) { return n.body; }
  776. ];
  777. Raise.prototype._astname = "Raise";
  778. Raise.prototype._fields = [
  779. "type", function(n) { return n.type; },
  780. "inst", function(n) { return n.inst; },
  781. "tback", function(n) { return n.tback; }
  782. ];
  783. TryExcept.prototype._astname = "TryExcept";
  784. TryExcept.prototype._fields = [
  785. "body", function(n) { return n.body; },
  786. "handlers", function(n) { return n.handlers; },
  787. "orelse", function(n) { return n.orelse; }
  788. ];
  789. TryFinally.prototype._astname = "TryFinally";
  790. TryFinally.prototype._fields = [
  791. "body", function(n) { return n.body; },
  792. "finalbody", function(n) { return n.finalbody; }
  793. ];
  794. Assert.prototype._astname = "Assert";
  795. Assert.prototype._fields = [
  796. "test", function(n) { return n.test; },
  797. "msg", function(n) { return n.msg; }
  798. ];
  799. Import_.prototype._astname = "Import";
  800. Import_.prototype._fields = [
  801. "names", function(n) { return n.names; }
  802. ];
  803. ImportFrom.prototype._astname = "ImportFrom";
  804. ImportFrom.prototype._fields = [
  805. "module", function(n) { return n.module; },
  806. "names", function(n) { return n.names; },
  807. "level", function(n) { return n.level; }
  808. ];
  809. Exec.prototype._astname = "Exec";
  810. Exec.prototype._fields = [
  811. "body", function(n) { return n.body; },
  812. "globals", function(n) { return n.globals; },
  813. "locals", function(n) { return n.locals; }
  814. ];
  815. Global.prototype._astname = "Global";
  816. Global.prototype._fields = [
  817. "names", function(n) { return n.names; }
  818. ];
  819. Expr.prototype._astname = "Expr";
  820. Expr.prototype._fields = [
  821. "value", function(n) { return n.value; }
  822. ];
  823. Pass.prototype._astname = "Pass";
  824. Pass.prototype._fields = [
  825. ];
  826. Break_.prototype._astname = "Break";
  827. Break_.prototype._fields = [
  828. ];
  829. Continue_.prototype._astname = "Continue";
  830. Continue_.prototype._fields = [
  831. ];
  832. Debugger_.prototype._astname = "Debugger";
  833. Debugger_.prototype._fields = [
  834. ];
  835. BoolOp.prototype._astname = "BoolOp";
  836. BoolOp.prototype._fields = [
  837. "op", function(n) { return n.op; },
  838. "values", function(n) { return n.values; }
  839. ];
  840. BinOp.prototype._astname = "BinOp";
  841. BinOp.prototype._fields = [
  842. "left", function(n) { return n.left; },
  843. "op", function(n) { return n.op; },
  844. "right", function(n) { return n.right; }
  845. ];
  846. UnaryOp.prototype._astname = "UnaryOp";
  847. UnaryOp.prototype._fields = [
  848. "op", function(n) { return n.op; },
  849. "operand", function(n) { return n.operand; }
  850. ];
  851. Lambda.prototype._astname = "Lambda";
  852. Lambda.prototype._fields = [
  853. "args", function(n) { return n.args; },
  854. "body", function(n) { return n.body; }
  855. ];
  856. IfExp.prototype._astname = "IfExp";
  857. IfExp.prototype._fields = [
  858. "test", function(n) { return n.test; },
  859. "body", function(n) { return n.body; },
  860. "orelse", function(n) { return n.orelse; }
  861. ];
  862. Dict.prototype._astname = "Dict";
  863. Dict.prototype._fields = [
  864. "keys", function(n) { return n.keys; },
  865. "values", function(n) { return n.values; }
  866. ];
  867. Set.prototype._astname = "Set";
  868. Set.prototype._fields = [
  869. "elts", function(n) { return n.elts; }
  870. ];
  871. ListComp.prototype._astname = "ListComp";
  872. ListComp.prototype._fields = [
  873. "elt", function(n) { return n.elt; },
  874. "generators", function(n) { return n.generators; }
  875. ];
  876. SetComp.prototype._astname = "SetComp";
  877. SetComp.prototype._fields = [
  878. "elt", function(n) { return n.elt; },
  879. "generators", function(n) { return n.generators; }
  880. ];
  881. DictComp.prototype._astname = "DictComp";
  882. DictComp.prototype._fields = [
  883. "key", function(n) { return n.key; },
  884. "value", function(n) { return n.value; },
  885. "generators", function(n) { return n.generators; }
  886. ];
  887. GeneratorExp.prototype._astname = "GeneratorExp";
  888. GeneratorExp.prototype._fields = [
  889. "elt", function(n) { return n.elt; },
  890. "generators", function(n) { return n.generators; }
  891. ];
  892. Yield.prototype._astname = "Yield";
  893. Yield.prototype._fields = [
  894. "value", function(n) { return n.value; }
  895. ];
  896. Compare.prototype._astname = "Compare";
  897. Compare.prototype._fields = [
  898. "left", function(n) { return n.left; },
  899. "ops", function(n) { return n.ops; },
  900. "comparators", function(n) { return n.comparators; }
  901. ];
  902. Call.prototype._astname = "Call";
  903. Call.prototype._fields = [
  904. "func", function(n) { return n.func; },
  905. "args", function(n) { return n.args; },
  906. "keywords", function(n) { return n.keywords; },
  907. "starargs", function(n) { return n.starargs; },
  908. "kwargs", function(n) { return n.kwargs; }
  909. ];
  910. Repr.prototype._astname = "Repr";
  911. Repr.prototype._fields = [
  912. "value", function(n) { return n.value; }
  913. ];
  914. Num.prototype._astname = "Num";
  915. Num.prototype._fields = [
  916. "n", function(n) { return n.n; }
  917. ];
  918. Str.prototype._astname = "Str";
  919. Str.prototype._fields = [
  920. "s", function(n) { return n.s; }
  921. ];
  922. Attribute.prototype._astname = "Attribute";
  923. Attribute.prototype._fields = [
  924. "value", function(n) { return n.value; },
  925. "attr", function(n) { return n.attr; },
  926. "ctx", function(n) { return n.ctx; }
  927. ];
  928. Subscript.prototype._astname = "Subscript";
  929. Subscript.prototype._fields = [
  930. "value", function(n) { return n.value; },
  931. "slice", function(n) { return n.slice; },
  932. "ctx", function(n) { return n.ctx; }
  933. ];
  934. Name.prototype._astname = "Name";
  935. Name.prototype._fields = [
  936. "id", function(n) { return n.id; },
  937. "ctx", function(n) { return n.ctx; }
  938. ];
  939. List.prototype._astname = "List";
  940. List.prototype._fields = [
  941. "elts", function(n) { return n.elts; },
  942. "ctx", function(n) { return n.ctx; }
  943. ];
  944. Tuple.prototype._astname = "Tuple";
  945. Tuple.prototype._fields = [
  946. "elts", function(n) { return n.elts; },
  947. "ctx", function(n) { return n.ctx; }
  948. ];
  949. Load.prototype._astname = "Load";
  950. Load.prototype._isenum = true;
  951. Store.prototype._astname = "Store";
  952. Store.prototype._isenum = true;
  953. Del.prototype._astname = "Del";
  954. Del.prototype._isenum = true;
  955. AugLoad.prototype._astname = "AugLoad";
  956. AugLoad.prototype._isenum = true;
  957. AugStore.prototype._astname = "AugStore";
  958. AugStore.prototype._isenum = true;
  959. Param.prototype._astname = "Param";
  960. Param.prototype._isenum = true;
  961. Ellipsis.prototype._astname = "Ellipsis";
  962. Ellipsis.prototype._fields = [
  963. ];
  964. Slice.prototype._astname = "Slice";
  965. Slice.prototype._fields = [
  966. "lower", function(n) { return n.lower; },
  967. "upper", function(n) { return n.upper; },
  968. "step", function(n) { return n.step; }
  969. ];
  970. ExtSlice.prototype._astname = "ExtSlice";
  971. ExtSlice.prototype._fields = [
  972. "dims", function(n) { return n.dims; }
  973. ];
  974. Index.prototype._astname = "Index";
  975. Index.prototype._fields = [
  976. "value", function(n) { return n.value; }
  977. ];
  978. And.prototype._astname = "And";
  979. And.prototype._isenum = true;
  980. Or.prototype._astname = "Or";
  981. Or.prototype._isenum = true;
  982. Add.prototype._astname = "Add";
  983. Add.prototype._isenum = true;
  984. Sub.prototype._astname = "Sub";
  985. Sub.prototype._isenum = true;
  986. Mult.prototype._astname = "Mult";
  987. Mult.prototype._isenum = true;
  988. Div.prototype._astname = "Div";
  989. Div.prototype._isenum = true;
  990. Mod.prototype._astname = "Mod";
  991. Mod.prototype._isenum = true;
  992. Pow.prototype._astname = "Pow";
  993. Pow.prototype._isenum = true;
  994. LShift.prototype._astname = "LShift";
  995. LShift.prototype._isenum = true;
  996. RShift.prototype._astname = "RShift";
  997. RShift.prototype._isenum = true;
  998. BitOr.prototype._astname = "BitOr";
  999. BitOr.prototype._isenum = true;
  1000. BitXor.prototype._astname = "BitXor";
  1001. BitXor.prototype._isenum = true;
  1002. BitAnd.prototype._astname = "BitAnd";
  1003. BitAnd.prototype._isenum = true;
  1004. FloorDiv.prototype._astname = "FloorDiv";
  1005. FloorDiv.prototype._isenum = true;
  1006. Invert.prototype._astname = "Invert";
  1007. Invert.prototype._isenum = true;
  1008. Not.prototype._astname = "Not";
  1009. Not.prototype._isenum = true;
  1010. UAdd.prototype._astname = "UAdd";
  1011. UAdd.prototype._isenum = true;
  1012. USub.prototype._astname = "USub";
  1013. USub.prototype._isenum = true;
  1014. Eq.prototype._astname = "Eq";
  1015. Eq.prototype._isenum = true;
  1016. NotEq.prototype._astname = "NotEq";
  1017. NotEq.prototype._isenum = true;
  1018. Lt.prototype._astname = "Lt";
  1019. Lt.prototype._isenum = true;
  1020. LtE.prototype._astname = "LtE";
  1021. LtE.prototype._isenum = true;
  1022. Gt.prototype._astname = "Gt";
  1023. Gt.prototype._isenum = true;
  1024. GtE.prototype._astname = "GtE";
  1025. GtE.prototype._isenum = true;
  1026. Is.prototype._astname = "Is";
  1027. Is.prototype._isenum = true;
  1028. IsNot.prototype._astname = "IsNot";
  1029. IsNot.prototype._isenum = true;
  1030. In_.prototype._astname = "In";
  1031. In_.prototype._isenum = true;
  1032. NotIn.prototype._astname = "NotIn";
  1033. NotIn.prototype._isenum = true;
  1034. comprehension.prototype._astname = "comprehension";
  1035. comprehension.prototype._fields = [
  1036. "target", function(n) { return n.target; },
  1037. "iter", function(n) { return n.iter; },
  1038. "ifs", function(n) { return n.ifs; }
  1039. ];
  1040. ExceptHandler.prototype._astname = "ExceptHandler";
  1041. ExceptHandler.prototype._fields = [
  1042. "type", function(n) { return n.type; },
  1043. "name", function(n) { return n.name; },
  1044. "body", function(n) { return n.body; }
  1045. ];
  1046. arguments_.prototype._astname = "arguments";
  1047. arguments_.prototype._fields = [
  1048. "args", function(n) { return n.args; },
  1049. "vararg", function(n) { return n.vararg; },
  1050. "kwarg", function(n) { return n.kwarg; },
  1051. "defaults", function(n) { return n.defaults; }
  1052. ];
  1053. keyword.prototype._astname = "keyword";
  1054. keyword.prototype._fields = [
  1055. "arg", function(n) { return n.arg; },
  1056. "value", function(n) { return n.value; }
  1057. ];
  1058. alias.prototype._astname = "alias";
  1059. alias.prototype._fields = [
  1060. "name", function(n) { return n.name; },
  1061. "asname", function(n) { return n.asname; }
  1062. ];