@plone/volto 14.0.1 → 14.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (218) hide show
  1. package/CHANGELOG.md +41 -0
  2. package/locales/ca/LC_MESSAGES/volto.po +12 -2
  3. package/locales/ca.json +1 -1
  4. package/locales/de/LC_MESSAGES/volto.po +12 -2
  5. package/locales/de.json +1 -1
  6. package/locales/en/LC_MESSAGES/volto.po +12 -2
  7. package/locales/en.json +1 -1
  8. package/locales/es/LC_MESSAGES/volto.po +12 -2
  9. package/locales/es.json +1 -1
  10. package/locales/eu/LC_MESSAGES/volto.po +12 -2
  11. package/locales/eu.json +1 -1
  12. package/locales/fr/LC_MESSAGES/volto.po +12 -2
  13. package/locales/fr.json +1 -1
  14. package/locales/it/LC_MESSAGES/volto.po +12 -2
  15. package/locales/it.json +1 -1
  16. package/locales/ja/LC_MESSAGES/volto.po +12 -2
  17. package/locales/ja.json +1 -1
  18. package/locales/nl/LC_MESSAGES/volto.po +12 -2
  19. package/locales/nl.json +1 -1
  20. package/locales/pt/LC_MESSAGES/volto.po +12 -2
  21. package/locales/pt.json +1 -1
  22. package/locales/pt_BR/LC_MESSAGES/volto.po +12 -2
  23. package/locales/pt_BR.json +1 -1
  24. package/locales/ro/LC_MESSAGES/volto.po +12 -2
  25. package/locales/ro.json +1 -1
  26. package/locales/volto.pot +12 -2
  27. package/package.json +2 -1
  28. package/public/icon.svg +13 -0
  29. package/src/actions/vocabularies/vocabularies.js +15 -3
  30. package/src/components/index.js +1 -0
  31. package/src/components/manage/Add/Add.jsx +1 -0
  32. package/src/components/manage/Blocks/HeroImageLeft/Edit.jsx +1 -1
  33. package/src/components/manage/Blocks/Listing/getAsyncData.js +1 -1
  34. package/src/components/manage/Blocks/Text/Edit.jsx +19 -0
  35. package/src/components/manage/Edit/Edit.jsx +1 -0
  36. package/src/components/manage/Form/Form.jsx +32 -6
  37. package/src/components/manage/Form/UndoToolbar.jsx +78 -0
  38. package/src/components/manage/Multilingual/TranslationObject.jsx +1 -0
  39. package/src/components/manage/Widgets/AlignWidget.stories.jsx +5 -21
  40. package/src/components/manage/Widgets/ArrayWidget.jsx +88 -88
  41. package/src/components/manage/Widgets/ArrayWidget.stories.jsx +37 -64
  42. package/src/components/manage/Widgets/CheckboxWidget.stories.jsx +5 -22
  43. package/src/components/manage/Widgets/DatetimeWidget.jsx +65 -74
  44. package/src/components/manage/Widgets/DatetimeWidget.stories.jsx +7 -23
  45. package/src/components/manage/Widgets/DatetimeWidget.test.jsx +17 -15
  46. package/src/components/manage/Widgets/EmailWidget.stories.jsx +5 -22
  47. package/src/components/manage/Widgets/FileWidget.stories.jsx +5 -22
  48. package/src/components/manage/Widgets/NumberWidget.stories.jsx +5 -23
  49. package/src/components/manage/Widgets/ObjectBrowserWidget.stories.js +24 -32
  50. package/src/components/manage/Widgets/ObjectListWidget.stories.js +44 -44
  51. package/src/components/manage/Widgets/ObjectWidget.stories.jsx +13 -28
  52. package/src/components/manage/Widgets/PasswordWidget.stories.jsx +5 -22
  53. package/src/components/manage/Widgets/QueryWidget.jsx +2 -2
  54. package/src/components/manage/Widgets/QueryWidget.stories.jsx +1637 -22
  55. package/src/components/manage/Widgets/SelectAutoComplete.jsx +79 -48
  56. package/src/components/manage/Widgets/SelectAutoComplete.test.jsx +16 -0
  57. package/src/components/manage/Widgets/SelectAutocompleteWidget.stories.jsx +161 -0
  58. package/src/components/manage/Widgets/SelectUtils.js +90 -30
  59. package/src/components/manage/Widgets/SelectUtils.test.jsx +76 -1
  60. package/src/components/manage/Widgets/SelectWidget.jsx +26 -37
  61. package/src/components/manage/Widgets/SelectWidget.stories.jsx +96 -28
  62. package/src/components/manage/Widgets/TextWidget.stories.jsx +5 -22
  63. package/src/components/manage/Widgets/TextareaWidget.stories.jsx +5 -22
  64. package/src/components/manage/Widgets/TokenWidget.jsx +19 -17
  65. package/src/components/manage/Widgets/TokenWidget.stories.jsx +141 -0
  66. package/src/components/manage/Widgets/UrlWidget.stories.jsx +5 -21
  67. package/src/components/manage/Widgets/VocabularyTermsWidget.stories.js +27 -64
  68. package/src/components/manage/Widgets/WysiwygWidget.stories.jsx +5 -22
  69. package/src/components/manage/Widgets/story.jsx +38 -0
  70. package/src/components/theme/ContactForm/ContactForm.jsx +1 -0
  71. package/src/components/theme/ContactForm/ContactForm.stories.jsx +126 -0
  72. package/src/components/theme/CorsError/CorsError.jsx +2 -2
  73. package/src/config/Blocks.jsx +8 -1
  74. package/src/config/Loadables.jsx +2 -0
  75. package/src/config/index.js +3 -0
  76. package/src/helpers/Html/Html.jsx +2 -12
  77. package/src/helpers/UndoManager/useUndoManager.js +102 -0
  78. package/src/helpers/index.js +1 -0
  79. package/src/reducers/vocabularies/vocabularies.js +13 -2
  80. package/src/store.js +1 -1
  81. package/src/storybook.jsx +55 -0
  82. package/theme/themes/pastanaga/extras/time-picker-overrides.less +1 -1
  83. package/include/python3.8/Python-ast.h +0 -715
  84. package/include/python3.8/Python.h +0 -160
  85. package/include/python3.8/abstract.h +0 -844
  86. package/include/python3.8/asdl.h +0 -46
  87. package/include/python3.8/ast.h +0 -37
  88. package/include/python3.8/bitset.h +0 -23
  89. package/include/python3.8/bltinmodule.h +0 -14
  90. package/include/python3.8/boolobject.h +0 -34
  91. package/include/python3.8/bytearrayobject.h +0 -62
  92. package/include/python3.8/bytes_methods.h +0 -69
  93. package/include/python3.8/bytesobject.h +0 -224
  94. package/include/python3.8/cellobject.h +0 -29
  95. package/include/python3.8/ceval.h +0 -231
  96. package/include/python3.8/classobject.h +0 -59
  97. package/include/python3.8/code.h +0 -180
  98. package/include/python3.8/codecs.h +0 -240
  99. package/include/python3.8/compile.h +0 -106
  100. package/include/python3.8/complexobject.h +0 -69
  101. package/include/python3.8/context.h +0 -84
  102. package/include/python3.8/cpython/abstract.h +0 -319
  103. package/include/python3.8/cpython/dictobject.h +0 -94
  104. package/include/python3.8/cpython/fileobject.h +0 -24
  105. package/include/python3.8/cpython/initconfig.h +0 -434
  106. package/include/python3.8/cpython/interpreteridobject.h +0 -19
  107. package/include/python3.8/cpython/object.h +0 -470
  108. package/include/python3.8/cpython/objimpl.h +0 -113
  109. package/include/python3.8/cpython/pyerrors.h +0 -188
  110. package/include/python3.8/cpython/pylifecycle.h +0 -78
  111. package/include/python3.8/cpython/pymem.h +0 -108
  112. package/include/python3.8/cpython/pystate.h +0 -252
  113. package/include/python3.8/cpython/sysmodule.h +0 -21
  114. package/include/python3.8/cpython/traceback.h +0 -22
  115. package/include/python3.8/cpython/tupleobject.h +0 -36
  116. package/include/python3.8/cpython/unicodeobject.h +0 -1239
  117. package/include/python3.8/datetime.h +0 -259
  118. package/include/python3.8/descrobject.h +0 -108
  119. package/include/python3.8/dictobject.h +0 -94
  120. package/include/python3.8/dtoa.h +0 -19
  121. package/include/python3.8/dynamic_annotations.h +0 -499
  122. package/include/python3.8/enumobject.h +0 -17
  123. package/include/python3.8/errcode.h +0 -38
  124. package/include/python3.8/eval.h +0 -37
  125. package/include/python3.8/fileobject.h +0 -49
  126. package/include/python3.8/fileutils.h +0 -185
  127. package/include/python3.8/floatobject.h +0 -130
  128. package/include/python3.8/frameobject.h +0 -92
  129. package/include/python3.8/funcobject.h +0 -104
  130. package/include/python3.8/genobject.h +0 -109
  131. package/include/python3.8/graminit.h +0 -94
  132. package/include/python3.8/grammar.h +0 -77
  133. package/include/python3.8/import.h +0 -149
  134. package/include/python3.8/internal/pycore_accu.h +0 -39
  135. package/include/python3.8/internal/pycore_atomic.h +0 -558
  136. package/include/python3.8/internal/pycore_ceval.h +0 -37
  137. package/include/python3.8/internal/pycore_code.h +0 -27
  138. package/include/python3.8/internal/pycore_condvar.h +0 -95
  139. package/include/python3.8/internal/pycore_context.h +0 -42
  140. package/include/python3.8/internal/pycore_fileutils.h +0 -54
  141. package/include/python3.8/internal/pycore_getopt.h +0 -22
  142. package/include/python3.8/internal/pycore_gil.h +0 -50
  143. package/include/python3.8/internal/pycore_hamt.h +0 -116
  144. package/include/python3.8/internal/pycore_initconfig.h +0 -166
  145. package/include/python3.8/internal/pycore_object.h +0 -81
  146. package/include/python3.8/internal/pycore_pathconfig.h +0 -75
  147. package/include/python3.8/internal/pycore_pyerrors.h +0 -62
  148. package/include/python3.8/internal/pycore_pyhash.h +0 -10
  149. package/include/python3.8/internal/pycore_pylifecycle.h +0 -118
  150. package/include/python3.8/internal/pycore_pymem.h +0 -212
  151. package/include/python3.8/internal/pycore_pystate.h +0 -326
  152. package/include/python3.8/internal/pycore_traceback.h +0 -96
  153. package/include/python3.8/internal/pycore_tupleobject.h +0 -19
  154. package/include/python3.8/internal/pycore_warnings.h +0 -25
  155. package/include/python3.8/interpreteridobject.h +0 -17
  156. package/include/python3.8/intrcheck.h +0 -33
  157. package/include/python3.8/iterobject.h +0 -25
  158. package/include/python3.8/listobject.h +0 -81
  159. package/include/python3.8/longintrepr.h +0 -99
  160. package/include/python3.8/longobject.h +0 -242
  161. package/include/python3.8/marshal.h +0 -28
  162. package/include/python3.8/memoryobject.h +0 -72
  163. package/include/python3.8/methodobject.h +0 -131
  164. package/include/python3.8/modsupport.h +0 -248
  165. package/include/python3.8/moduleobject.h +0 -90
  166. package/include/python3.8/namespaceobject.h +0 -19
  167. package/include/python3.8/node.h +0 -48
  168. package/include/python3.8/object.h +0 -753
  169. package/include/python3.8/objimpl.h +0 -284
  170. package/include/python3.8/odictobject.h +0 -43
  171. package/include/python3.8/opcode.h +0 -148
  172. package/include/python3.8/osdefs.h +0 -51
  173. package/include/python3.8/osmodule.h +0 -17
  174. package/include/python3.8/parsetok.h +0 -110
  175. package/include/python3.8/patchlevel.h +0 -35
  176. package/include/python3.8/picklebufobject.h +0 -31
  177. package/include/python3.8/py_curses.h +0 -100
  178. package/include/python3.8/pyarena.h +0 -64
  179. package/include/python3.8/pycapsule.h +0 -59
  180. package/include/python3.8/pyconfig.h +0 -1665
  181. package/include/python3.8/pyctype.h +0 -39
  182. package/include/python3.8/pydebug.h +0 -40
  183. package/include/python3.8/pydtrace.h +0 -59
  184. package/include/python3.8/pydtrace_probes.h +0 -228
  185. package/include/python3.8/pyerrors.h +0 -335
  186. package/include/python3.8/pyexpat.h +0 -55
  187. package/include/python3.8/pyfpe.h +0 -12
  188. package/include/python3.8/pyhash.h +0 -145
  189. package/include/python3.8/pylifecycle.h +0 -75
  190. package/include/python3.8/pymacconfig.h +0 -102
  191. package/include/python3.8/pymacro.h +0 -106
  192. package/include/python3.8/pymath.h +0 -230
  193. package/include/python3.8/pymem.h +0 -150
  194. package/include/python3.8/pyport.h +0 -850
  195. package/include/python3.8/pystate.h +0 -136
  196. package/include/python3.8/pystrcmp.h +0 -23
  197. package/include/python3.8/pystrhex.h +0 -22
  198. package/include/python3.8/pystrtod.h +0 -45
  199. package/include/python3.8/pythonrun.h +0 -210
  200. package/include/python3.8/pythread.h +0 -161
  201. package/include/python3.8/pytime.h +0 -246
  202. package/include/python3.8/rangeobject.h +0 -27
  203. package/include/python3.8/setobject.h +0 -108
  204. package/include/python3.8/sliceobject.h +0 -65
  205. package/include/python3.8/structmember.h +0 -74
  206. package/include/python3.8/structseq.h +0 -49
  207. package/include/python3.8/symtable.h +0 -123
  208. package/include/python3.8/sysmodule.h +0 -41
  209. package/include/python3.8/token.h +0 -92
  210. package/include/python3.8/traceback.h +0 -28
  211. package/include/python3.8/tracemalloc.h +0 -38
  212. package/include/python3.8/tupleobject.h +0 -48
  213. package/include/python3.8/typeslots.h +0 -85
  214. package/include/python3.8/ucnhash.h +0 -36
  215. package/include/python3.8/unicodeobject.h +0 -1044
  216. package/include/python3.8/warnings.h +0 -67
  217. package/include/python3.8/weakrefobject.h +0 -86
  218. package/src/components/theme/ContactForm/ContactForm.stories.mdx +0 -39
@@ -1,715 +0,0 @@
1
- /* File automatically generated by Parser/asdl_c.py. */
2
-
3
- #ifndef Py_PYTHON_AST_H
4
- #define Py_PYTHON_AST_H
5
- #ifdef __cplusplus
6
- extern "C" {
7
- #endif
8
-
9
- #include "asdl.h"
10
-
11
- #undef Yield /* undefine macro conflicting with <winbase.h> */
12
-
13
- typedef struct _mod *mod_ty;
14
-
15
- typedef struct _stmt *stmt_ty;
16
-
17
- typedef struct _expr *expr_ty;
18
-
19
- typedef enum _expr_context { Load=1, Store=2, Del=3, AugLoad=4, AugStore=5,
20
- Param=6 } expr_context_ty;
21
-
22
- typedef struct _slice *slice_ty;
23
-
24
- typedef enum _boolop { And=1, Or=2 } boolop_ty;
25
-
26
- typedef enum _operator { Add=1, Sub=2, Mult=3, MatMult=4, Div=5, Mod=6, Pow=7,
27
- LShift=8, RShift=9, BitOr=10, BitXor=11, BitAnd=12,
28
- FloorDiv=13 } operator_ty;
29
-
30
- typedef enum _unaryop { Invert=1, Not=2, UAdd=3, USub=4 } unaryop_ty;
31
-
32
- typedef enum _cmpop { Eq=1, NotEq=2, Lt=3, LtE=4, Gt=5, GtE=6, Is=7, IsNot=8,
33
- In=9, NotIn=10 } cmpop_ty;
34
-
35
- typedef struct _comprehension *comprehension_ty;
36
-
37
- typedef struct _excepthandler *excepthandler_ty;
38
-
39
- typedef struct _arguments *arguments_ty;
40
-
41
- typedef struct _arg *arg_ty;
42
-
43
- typedef struct _keyword *keyword_ty;
44
-
45
- typedef struct _alias *alias_ty;
46
-
47
- typedef struct _withitem *withitem_ty;
48
-
49
- typedef struct _type_ignore *type_ignore_ty;
50
-
51
-
52
- enum _mod_kind {Module_kind=1, Interactive_kind=2, Expression_kind=3,
53
- FunctionType_kind=4, Suite_kind=5};
54
- struct _mod {
55
- enum _mod_kind kind;
56
- union {
57
- struct {
58
- asdl_seq *body;
59
- asdl_seq *type_ignores;
60
- } Module;
61
-
62
- struct {
63
- asdl_seq *body;
64
- } Interactive;
65
-
66
- struct {
67
- expr_ty body;
68
- } Expression;
69
-
70
- struct {
71
- asdl_seq *argtypes;
72
- expr_ty returns;
73
- } FunctionType;
74
-
75
- struct {
76
- asdl_seq *body;
77
- } Suite;
78
-
79
- } v;
80
- };
81
-
82
- enum _stmt_kind {FunctionDef_kind=1, AsyncFunctionDef_kind=2, ClassDef_kind=3,
83
- Return_kind=4, Delete_kind=5, Assign_kind=6,
84
- AugAssign_kind=7, AnnAssign_kind=8, For_kind=9,
85
- AsyncFor_kind=10, While_kind=11, If_kind=12, With_kind=13,
86
- AsyncWith_kind=14, Raise_kind=15, Try_kind=16,
87
- Assert_kind=17, Import_kind=18, ImportFrom_kind=19,
88
- Global_kind=20, Nonlocal_kind=21, Expr_kind=22, Pass_kind=23,
89
- Break_kind=24, Continue_kind=25};
90
- struct _stmt {
91
- enum _stmt_kind kind;
92
- union {
93
- struct {
94
- identifier name;
95
- arguments_ty args;
96
- asdl_seq *body;
97
- asdl_seq *decorator_list;
98
- expr_ty returns;
99
- string type_comment;
100
- } FunctionDef;
101
-
102
- struct {
103
- identifier name;
104
- arguments_ty args;
105
- asdl_seq *body;
106
- asdl_seq *decorator_list;
107
- expr_ty returns;
108
- string type_comment;
109
- } AsyncFunctionDef;
110
-
111
- struct {
112
- identifier name;
113
- asdl_seq *bases;
114
- asdl_seq *keywords;
115
- asdl_seq *body;
116
- asdl_seq *decorator_list;
117
- } ClassDef;
118
-
119
- struct {
120
- expr_ty value;
121
- } Return;
122
-
123
- struct {
124
- asdl_seq *targets;
125
- } Delete;
126
-
127
- struct {
128
- asdl_seq *targets;
129
- expr_ty value;
130
- string type_comment;
131
- } Assign;
132
-
133
- struct {
134
- expr_ty target;
135
- operator_ty op;
136
- expr_ty value;
137
- } AugAssign;
138
-
139
- struct {
140
- expr_ty target;
141
- expr_ty annotation;
142
- expr_ty value;
143
- int simple;
144
- } AnnAssign;
145
-
146
- struct {
147
- expr_ty target;
148
- expr_ty iter;
149
- asdl_seq *body;
150
- asdl_seq *orelse;
151
- string type_comment;
152
- } For;
153
-
154
- struct {
155
- expr_ty target;
156
- expr_ty iter;
157
- asdl_seq *body;
158
- asdl_seq *orelse;
159
- string type_comment;
160
- } AsyncFor;
161
-
162
- struct {
163
- expr_ty test;
164
- asdl_seq *body;
165
- asdl_seq *orelse;
166
- } While;
167
-
168
- struct {
169
- expr_ty test;
170
- asdl_seq *body;
171
- asdl_seq *orelse;
172
- } If;
173
-
174
- struct {
175
- asdl_seq *items;
176
- asdl_seq *body;
177
- string type_comment;
178
- } With;
179
-
180
- struct {
181
- asdl_seq *items;
182
- asdl_seq *body;
183
- string type_comment;
184
- } AsyncWith;
185
-
186
- struct {
187
- expr_ty exc;
188
- expr_ty cause;
189
- } Raise;
190
-
191
- struct {
192
- asdl_seq *body;
193
- asdl_seq *handlers;
194
- asdl_seq *orelse;
195
- asdl_seq *finalbody;
196
- } Try;
197
-
198
- struct {
199
- expr_ty test;
200
- expr_ty msg;
201
- } Assert;
202
-
203
- struct {
204
- asdl_seq *names;
205
- } Import;
206
-
207
- struct {
208
- identifier module;
209
- asdl_seq *names;
210
- int level;
211
- } ImportFrom;
212
-
213
- struct {
214
- asdl_seq *names;
215
- } Global;
216
-
217
- struct {
218
- asdl_seq *names;
219
- } Nonlocal;
220
-
221
- struct {
222
- expr_ty value;
223
- } Expr;
224
-
225
- } v;
226
- int lineno;
227
- int col_offset;
228
- int end_lineno;
229
- int end_col_offset;
230
- };
231
-
232
- enum _expr_kind {BoolOp_kind=1, NamedExpr_kind=2, BinOp_kind=3, UnaryOp_kind=4,
233
- Lambda_kind=5, IfExp_kind=6, Dict_kind=7, Set_kind=8,
234
- ListComp_kind=9, SetComp_kind=10, DictComp_kind=11,
235
- GeneratorExp_kind=12, Await_kind=13, Yield_kind=14,
236
- YieldFrom_kind=15, Compare_kind=16, Call_kind=17,
237
- FormattedValue_kind=18, JoinedStr_kind=19, Constant_kind=20,
238
- Attribute_kind=21, Subscript_kind=22, Starred_kind=23,
239
- Name_kind=24, List_kind=25, Tuple_kind=26};
240
- struct _expr {
241
- enum _expr_kind kind;
242
- union {
243
- struct {
244
- boolop_ty op;
245
- asdl_seq *values;
246
- } BoolOp;
247
-
248
- struct {
249
- expr_ty target;
250
- expr_ty value;
251
- } NamedExpr;
252
-
253
- struct {
254
- expr_ty left;
255
- operator_ty op;
256
- expr_ty right;
257
- } BinOp;
258
-
259
- struct {
260
- unaryop_ty op;
261
- expr_ty operand;
262
- } UnaryOp;
263
-
264
- struct {
265
- arguments_ty args;
266
- expr_ty body;
267
- } Lambda;
268
-
269
- struct {
270
- expr_ty test;
271
- expr_ty body;
272
- expr_ty orelse;
273
- } IfExp;
274
-
275
- struct {
276
- asdl_seq *keys;
277
- asdl_seq *values;
278
- } Dict;
279
-
280
- struct {
281
- asdl_seq *elts;
282
- } Set;
283
-
284
- struct {
285
- expr_ty elt;
286
- asdl_seq *generators;
287
- } ListComp;
288
-
289
- struct {
290
- expr_ty elt;
291
- asdl_seq *generators;
292
- } SetComp;
293
-
294
- struct {
295
- expr_ty key;
296
- expr_ty value;
297
- asdl_seq *generators;
298
- } DictComp;
299
-
300
- struct {
301
- expr_ty elt;
302
- asdl_seq *generators;
303
- } GeneratorExp;
304
-
305
- struct {
306
- expr_ty value;
307
- } Await;
308
-
309
- struct {
310
- expr_ty value;
311
- } Yield;
312
-
313
- struct {
314
- expr_ty value;
315
- } YieldFrom;
316
-
317
- struct {
318
- expr_ty left;
319
- asdl_int_seq *ops;
320
- asdl_seq *comparators;
321
- } Compare;
322
-
323
- struct {
324
- expr_ty func;
325
- asdl_seq *args;
326
- asdl_seq *keywords;
327
- } Call;
328
-
329
- struct {
330
- expr_ty value;
331
- int conversion;
332
- expr_ty format_spec;
333
- } FormattedValue;
334
-
335
- struct {
336
- asdl_seq *values;
337
- } JoinedStr;
338
-
339
- struct {
340
- constant value;
341
- string kind;
342
- } Constant;
343
-
344
- struct {
345
- expr_ty value;
346
- identifier attr;
347
- expr_context_ty ctx;
348
- } Attribute;
349
-
350
- struct {
351
- expr_ty value;
352
- slice_ty slice;
353
- expr_context_ty ctx;
354
- } Subscript;
355
-
356
- struct {
357
- expr_ty value;
358
- expr_context_ty ctx;
359
- } Starred;
360
-
361
- struct {
362
- identifier id;
363
- expr_context_ty ctx;
364
- } Name;
365
-
366
- struct {
367
- asdl_seq *elts;
368
- expr_context_ty ctx;
369
- } List;
370
-
371
- struct {
372
- asdl_seq *elts;
373
- expr_context_ty ctx;
374
- } Tuple;
375
-
376
- } v;
377
- int lineno;
378
- int col_offset;
379
- int end_lineno;
380
- int end_col_offset;
381
- };
382
-
383
- enum _slice_kind {Slice_kind=1, ExtSlice_kind=2, Index_kind=3};
384
- struct _slice {
385
- enum _slice_kind kind;
386
- union {
387
- struct {
388
- expr_ty lower;
389
- expr_ty upper;
390
- expr_ty step;
391
- } Slice;
392
-
393
- struct {
394
- asdl_seq *dims;
395
- } ExtSlice;
396
-
397
- struct {
398
- expr_ty value;
399
- } Index;
400
-
401
- } v;
402
- };
403
-
404
- struct _comprehension {
405
- expr_ty target;
406
- expr_ty iter;
407
- asdl_seq *ifs;
408
- int is_async;
409
- };
410
-
411
- enum _excepthandler_kind {ExceptHandler_kind=1};
412
- struct _excepthandler {
413
- enum _excepthandler_kind kind;
414
- union {
415
- struct {
416
- expr_ty type;
417
- identifier name;
418
- asdl_seq *body;
419
- } ExceptHandler;
420
-
421
- } v;
422
- int lineno;
423
- int col_offset;
424
- int end_lineno;
425
- int end_col_offset;
426
- };
427
-
428
- struct _arguments {
429
- asdl_seq *posonlyargs;
430
- asdl_seq *args;
431
- arg_ty vararg;
432
- asdl_seq *kwonlyargs;
433
- asdl_seq *kw_defaults;
434
- arg_ty kwarg;
435
- asdl_seq *defaults;
436
- };
437
-
438
- struct _arg {
439
- identifier arg;
440
- expr_ty annotation;
441
- string type_comment;
442
- int lineno;
443
- int col_offset;
444
- int end_lineno;
445
- int end_col_offset;
446
- };
447
-
448
- struct _keyword {
449
- identifier arg;
450
- expr_ty value;
451
- };
452
-
453
- struct _alias {
454
- identifier name;
455
- identifier asname;
456
- };
457
-
458
- struct _withitem {
459
- expr_ty context_expr;
460
- expr_ty optional_vars;
461
- };
462
-
463
- enum _type_ignore_kind {TypeIgnore_kind=1};
464
- struct _type_ignore {
465
- enum _type_ignore_kind kind;
466
- union {
467
- struct {
468
- int lineno;
469
- string tag;
470
- } TypeIgnore;
471
-
472
- } v;
473
- };
474
-
475
-
476
- // Note: these macros affect function definitions, not only call sites.
477
- #define Module(a0, a1, a2) _Py_Module(a0, a1, a2)
478
- mod_ty _Py_Module(asdl_seq * body, asdl_seq * type_ignores, PyArena *arena);
479
- #define Interactive(a0, a1) _Py_Interactive(a0, a1)
480
- mod_ty _Py_Interactive(asdl_seq * body, PyArena *arena);
481
- #define Expression(a0, a1) _Py_Expression(a0, a1)
482
- mod_ty _Py_Expression(expr_ty body, PyArena *arena);
483
- #define FunctionType(a0, a1, a2) _Py_FunctionType(a0, a1, a2)
484
- mod_ty _Py_FunctionType(asdl_seq * argtypes, expr_ty returns, PyArena *arena);
485
- #define Suite(a0, a1) _Py_Suite(a0, a1)
486
- mod_ty _Py_Suite(asdl_seq * body, PyArena *arena);
487
- #define FunctionDef(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10) _Py_FunctionDef(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10)
488
- stmt_ty _Py_FunctionDef(identifier name, arguments_ty args, asdl_seq * body,
489
- asdl_seq * decorator_list, expr_ty returns, string
490
- type_comment, int lineno, int col_offset, int
491
- end_lineno, int end_col_offset, PyArena *arena);
492
- #define AsyncFunctionDef(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10) _Py_AsyncFunctionDef(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10)
493
- stmt_ty _Py_AsyncFunctionDef(identifier name, arguments_ty args, asdl_seq *
494
- body, asdl_seq * decorator_list, expr_ty returns,
495
- string type_comment, int lineno, int col_offset,
496
- int end_lineno, int end_col_offset, PyArena
497
- *arena);
498
- #define ClassDef(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9) _Py_ClassDef(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9)
499
- stmt_ty _Py_ClassDef(identifier name, asdl_seq * bases, asdl_seq * keywords,
500
- asdl_seq * body, asdl_seq * decorator_list, int lineno,
501
- int col_offset, int end_lineno, int end_col_offset,
502
- PyArena *arena);
503
- #define Return(a0, a1, a2, a3, a4, a5) _Py_Return(a0, a1, a2, a3, a4, a5)
504
- stmt_ty _Py_Return(expr_ty value, int lineno, int col_offset, int end_lineno,
505
- int end_col_offset, PyArena *arena);
506
- #define Delete(a0, a1, a2, a3, a4, a5) _Py_Delete(a0, a1, a2, a3, a4, a5)
507
- stmt_ty _Py_Delete(asdl_seq * targets, int lineno, int col_offset, int
508
- end_lineno, int end_col_offset, PyArena *arena);
509
- #define Assign(a0, a1, a2, a3, a4, a5, a6, a7) _Py_Assign(a0, a1, a2, a3, a4, a5, a6, a7)
510
- stmt_ty _Py_Assign(asdl_seq * targets, expr_ty value, string type_comment, int
511
- lineno, int col_offset, int end_lineno, int end_col_offset,
512
- PyArena *arena);
513
- #define AugAssign(a0, a1, a2, a3, a4, a5, a6, a7) _Py_AugAssign(a0, a1, a2, a3, a4, a5, a6, a7)
514
- stmt_ty _Py_AugAssign(expr_ty target, operator_ty op, expr_ty value, int
515
- lineno, int col_offset, int end_lineno, int
516
- end_col_offset, PyArena *arena);
517
- #define AnnAssign(a0, a1, a2, a3, a4, a5, a6, a7, a8) _Py_AnnAssign(a0, a1, a2, a3, a4, a5, a6, a7, a8)
518
- stmt_ty _Py_AnnAssign(expr_ty target, expr_ty annotation, expr_ty value, int
519
- simple, int lineno, int col_offset, int end_lineno, int
520
- end_col_offset, PyArena *arena);
521
- #define For(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9) _Py_For(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9)
522
- stmt_ty _Py_For(expr_ty target, expr_ty iter, asdl_seq * body, asdl_seq *
523
- orelse, string type_comment, int lineno, int col_offset, int
524
- end_lineno, int end_col_offset, PyArena *arena);
525
- #define AsyncFor(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9) _Py_AsyncFor(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9)
526
- stmt_ty _Py_AsyncFor(expr_ty target, expr_ty iter, asdl_seq * body, asdl_seq *
527
- orelse, string type_comment, int lineno, int col_offset,
528
- int end_lineno, int end_col_offset, PyArena *arena);
529
- #define While(a0, a1, a2, a3, a4, a5, a6, a7) _Py_While(a0, a1, a2, a3, a4, a5, a6, a7)
530
- stmt_ty _Py_While(expr_ty test, asdl_seq * body, asdl_seq * orelse, int lineno,
531
- int col_offset, int end_lineno, int end_col_offset, PyArena
532
- *arena);
533
- #define If(a0, a1, a2, a3, a4, a5, a6, a7) _Py_If(a0, a1, a2, a3, a4, a5, a6, a7)
534
- stmt_ty _Py_If(expr_ty test, asdl_seq * body, asdl_seq * orelse, int lineno,
535
- int col_offset, int end_lineno, int end_col_offset, PyArena
536
- *arena);
537
- #define With(a0, a1, a2, a3, a4, a5, a6, a7) _Py_With(a0, a1, a2, a3, a4, a5, a6, a7)
538
- stmt_ty _Py_With(asdl_seq * items, asdl_seq * body, string type_comment, int
539
- lineno, int col_offset, int end_lineno, int end_col_offset,
540
- PyArena *arena);
541
- #define AsyncWith(a0, a1, a2, a3, a4, a5, a6, a7) _Py_AsyncWith(a0, a1, a2, a3, a4, a5, a6, a7)
542
- stmt_ty _Py_AsyncWith(asdl_seq * items, asdl_seq * body, string type_comment,
543
- int lineno, int col_offset, int end_lineno, int
544
- end_col_offset, PyArena *arena);
545
- #define Raise(a0, a1, a2, a3, a4, a5, a6) _Py_Raise(a0, a1, a2, a3, a4, a5, a6)
546
- stmt_ty _Py_Raise(expr_ty exc, expr_ty cause, int lineno, int col_offset, int
547
- end_lineno, int end_col_offset, PyArena *arena);
548
- #define Try(a0, a1, a2, a3, a4, a5, a6, a7, a8) _Py_Try(a0, a1, a2, a3, a4, a5, a6, a7, a8)
549
- stmt_ty _Py_Try(asdl_seq * body, asdl_seq * handlers, asdl_seq * orelse,
550
- asdl_seq * finalbody, int lineno, int col_offset, int
551
- end_lineno, int end_col_offset, PyArena *arena);
552
- #define Assert(a0, a1, a2, a3, a4, a5, a6) _Py_Assert(a0, a1, a2, a3, a4, a5, a6)
553
- stmt_ty _Py_Assert(expr_ty test, expr_ty msg, int lineno, int col_offset, int
554
- end_lineno, int end_col_offset, PyArena *arena);
555
- #define Import(a0, a1, a2, a3, a4, a5) _Py_Import(a0, a1, a2, a3, a4, a5)
556
- stmt_ty _Py_Import(asdl_seq * names, int lineno, int col_offset, int
557
- end_lineno, int end_col_offset, PyArena *arena);
558
- #define ImportFrom(a0, a1, a2, a3, a4, a5, a6, a7) _Py_ImportFrom(a0, a1, a2, a3, a4, a5, a6, a7)
559
- stmt_ty _Py_ImportFrom(identifier module, asdl_seq * names, int level, int
560
- lineno, int col_offset, int end_lineno, int
561
- end_col_offset, PyArena *arena);
562
- #define Global(a0, a1, a2, a3, a4, a5) _Py_Global(a0, a1, a2, a3, a4, a5)
563
- stmt_ty _Py_Global(asdl_seq * names, int lineno, int col_offset, int
564
- end_lineno, int end_col_offset, PyArena *arena);
565
- #define Nonlocal(a0, a1, a2, a3, a4, a5) _Py_Nonlocal(a0, a1, a2, a3, a4, a5)
566
- stmt_ty _Py_Nonlocal(asdl_seq * names, int lineno, int col_offset, int
567
- end_lineno, int end_col_offset, PyArena *arena);
568
- #define Expr(a0, a1, a2, a3, a4, a5) _Py_Expr(a0, a1, a2, a3, a4, a5)
569
- stmt_ty _Py_Expr(expr_ty value, int lineno, int col_offset, int end_lineno, int
570
- end_col_offset, PyArena *arena);
571
- #define Pass(a0, a1, a2, a3, a4) _Py_Pass(a0, a1, a2, a3, a4)
572
- stmt_ty _Py_Pass(int lineno, int col_offset, int end_lineno, int
573
- end_col_offset, PyArena *arena);
574
- #define Break(a0, a1, a2, a3, a4) _Py_Break(a0, a1, a2, a3, a4)
575
- stmt_ty _Py_Break(int lineno, int col_offset, int end_lineno, int
576
- end_col_offset, PyArena *arena);
577
- #define Continue(a0, a1, a2, a3, a4) _Py_Continue(a0, a1, a2, a3, a4)
578
- stmt_ty _Py_Continue(int lineno, int col_offset, int end_lineno, int
579
- end_col_offset, PyArena *arena);
580
- #define BoolOp(a0, a1, a2, a3, a4, a5, a6) _Py_BoolOp(a0, a1, a2, a3, a4, a5, a6)
581
- expr_ty _Py_BoolOp(boolop_ty op, asdl_seq * values, int lineno, int col_offset,
582
- int end_lineno, int end_col_offset, PyArena *arena);
583
- #define NamedExpr(a0, a1, a2, a3, a4, a5, a6) _Py_NamedExpr(a0, a1, a2, a3, a4, a5, a6)
584
- expr_ty _Py_NamedExpr(expr_ty target, expr_ty value, int lineno, int
585
- col_offset, int end_lineno, int end_col_offset, PyArena
586
- *arena);
587
- #define BinOp(a0, a1, a2, a3, a4, a5, a6, a7) _Py_BinOp(a0, a1, a2, a3, a4, a5, a6, a7)
588
- expr_ty _Py_BinOp(expr_ty left, operator_ty op, expr_ty right, int lineno, int
589
- col_offset, int end_lineno, int end_col_offset, PyArena
590
- *arena);
591
- #define UnaryOp(a0, a1, a2, a3, a4, a5, a6) _Py_UnaryOp(a0, a1, a2, a3, a4, a5, a6)
592
- expr_ty _Py_UnaryOp(unaryop_ty op, expr_ty operand, int lineno, int col_offset,
593
- int end_lineno, int end_col_offset, PyArena *arena);
594
- #define Lambda(a0, a1, a2, a3, a4, a5, a6) _Py_Lambda(a0, a1, a2, a3, a4, a5, a6)
595
- expr_ty _Py_Lambda(arguments_ty args, expr_ty body, int lineno, int col_offset,
596
- int end_lineno, int end_col_offset, PyArena *arena);
597
- #define IfExp(a0, a1, a2, a3, a4, a5, a6, a7) _Py_IfExp(a0, a1, a2, a3, a4, a5, a6, a7)
598
- expr_ty _Py_IfExp(expr_ty test, expr_ty body, expr_ty orelse, int lineno, int
599
- col_offset, int end_lineno, int end_col_offset, PyArena
600
- *arena);
601
- #define Dict(a0, a1, a2, a3, a4, a5, a6) _Py_Dict(a0, a1, a2, a3, a4, a5, a6)
602
- expr_ty _Py_Dict(asdl_seq * keys, asdl_seq * values, int lineno, int
603
- col_offset, int end_lineno, int end_col_offset, PyArena
604
- *arena);
605
- #define Set(a0, a1, a2, a3, a4, a5) _Py_Set(a0, a1, a2, a3, a4, a5)
606
- expr_ty _Py_Set(asdl_seq * elts, int lineno, int col_offset, int end_lineno,
607
- int end_col_offset, PyArena *arena);
608
- #define ListComp(a0, a1, a2, a3, a4, a5, a6) _Py_ListComp(a0, a1, a2, a3, a4, a5, a6)
609
- expr_ty _Py_ListComp(expr_ty elt, asdl_seq * generators, int lineno, int
610
- col_offset, int end_lineno, int end_col_offset, PyArena
611
- *arena);
612
- #define SetComp(a0, a1, a2, a3, a4, a5, a6) _Py_SetComp(a0, a1, a2, a3, a4, a5, a6)
613
- expr_ty _Py_SetComp(expr_ty elt, asdl_seq * generators, int lineno, int
614
- col_offset, int end_lineno, int end_col_offset, PyArena
615
- *arena);
616
- #define DictComp(a0, a1, a2, a3, a4, a5, a6, a7) _Py_DictComp(a0, a1, a2, a3, a4, a5, a6, a7)
617
- expr_ty _Py_DictComp(expr_ty key, expr_ty value, asdl_seq * generators, int
618
- lineno, int col_offset, int end_lineno, int
619
- end_col_offset, PyArena *arena);
620
- #define GeneratorExp(a0, a1, a2, a3, a4, a5, a6) _Py_GeneratorExp(a0, a1, a2, a3, a4, a5, a6)
621
- expr_ty _Py_GeneratorExp(expr_ty elt, asdl_seq * generators, int lineno, int
622
- col_offset, int end_lineno, int end_col_offset,
623
- PyArena *arena);
624
- #define Await(a0, a1, a2, a3, a4, a5) _Py_Await(a0, a1, a2, a3, a4, a5)
625
- expr_ty _Py_Await(expr_ty value, int lineno, int col_offset, int end_lineno,
626
- int end_col_offset, PyArena *arena);
627
- #define Yield(a0, a1, a2, a3, a4, a5) _Py_Yield(a0, a1, a2, a3, a4, a5)
628
- expr_ty _Py_Yield(expr_ty value, int lineno, int col_offset, int end_lineno,
629
- int end_col_offset, PyArena *arena);
630
- #define YieldFrom(a0, a1, a2, a3, a4, a5) _Py_YieldFrom(a0, a1, a2, a3, a4, a5)
631
- expr_ty _Py_YieldFrom(expr_ty value, int lineno, int col_offset, int
632
- end_lineno, int end_col_offset, PyArena *arena);
633
- #define Compare(a0, a1, a2, a3, a4, a5, a6, a7) _Py_Compare(a0, a1, a2, a3, a4, a5, a6, a7)
634
- expr_ty _Py_Compare(expr_ty left, asdl_int_seq * ops, asdl_seq * comparators,
635
- int lineno, int col_offset, int end_lineno, int
636
- end_col_offset, PyArena *arena);
637
- #define Call(a0, a1, a2, a3, a4, a5, a6, a7) _Py_Call(a0, a1, a2, a3, a4, a5, a6, a7)
638
- expr_ty _Py_Call(expr_ty func, asdl_seq * args, asdl_seq * keywords, int
639
- lineno, int col_offset, int end_lineno, int end_col_offset,
640
- PyArena *arena);
641
- #define FormattedValue(a0, a1, a2, a3, a4, a5, a6, a7) _Py_FormattedValue(a0, a1, a2, a3, a4, a5, a6, a7)
642
- expr_ty _Py_FormattedValue(expr_ty value, int conversion, expr_ty format_spec,
643
- int lineno, int col_offset, int end_lineno, int
644
- end_col_offset, PyArena *arena);
645
- #define JoinedStr(a0, a1, a2, a3, a4, a5) _Py_JoinedStr(a0, a1, a2, a3, a4, a5)
646
- expr_ty _Py_JoinedStr(asdl_seq * values, int lineno, int col_offset, int
647
- end_lineno, int end_col_offset, PyArena *arena);
648
- #define Constant(a0, a1, a2, a3, a4, a5, a6) _Py_Constant(a0, a1, a2, a3, a4, a5, a6)
649
- expr_ty _Py_Constant(constant value, string kind, int lineno, int col_offset,
650
- int end_lineno, int end_col_offset, PyArena *arena);
651
- #define Attribute(a0, a1, a2, a3, a4, a5, a6, a7) _Py_Attribute(a0, a1, a2, a3, a4, a5, a6, a7)
652
- expr_ty _Py_Attribute(expr_ty value, identifier attr, expr_context_ty ctx, int
653
- lineno, int col_offset, int end_lineno, int
654
- end_col_offset, PyArena *arena);
655
- #define Subscript(a0, a1, a2, a3, a4, a5, a6, a7) _Py_Subscript(a0, a1, a2, a3, a4, a5, a6, a7)
656
- expr_ty _Py_Subscript(expr_ty value, slice_ty slice, expr_context_ty ctx, int
657
- lineno, int col_offset, int end_lineno, int
658
- end_col_offset, PyArena *arena);
659
- #define Starred(a0, a1, a2, a3, a4, a5, a6) _Py_Starred(a0, a1, a2, a3, a4, a5, a6)
660
- expr_ty _Py_Starred(expr_ty value, expr_context_ty ctx, int lineno, int
661
- col_offset, int end_lineno, int end_col_offset, PyArena
662
- *arena);
663
- #define Name(a0, a1, a2, a3, a4, a5, a6) _Py_Name(a0, a1, a2, a3, a4, a5, a6)
664
- expr_ty _Py_Name(identifier id, expr_context_ty ctx, int lineno, int
665
- col_offset, int end_lineno, int end_col_offset, PyArena
666
- *arena);
667
- #define List(a0, a1, a2, a3, a4, a5, a6) _Py_List(a0, a1, a2, a3, a4, a5, a6)
668
- expr_ty _Py_List(asdl_seq * elts, expr_context_ty ctx, int lineno, int
669
- col_offset, int end_lineno, int end_col_offset, PyArena
670
- *arena);
671
- #define Tuple(a0, a1, a2, a3, a4, a5, a6) _Py_Tuple(a0, a1, a2, a3, a4, a5, a6)
672
- expr_ty _Py_Tuple(asdl_seq * elts, expr_context_ty ctx, int lineno, int
673
- col_offset, int end_lineno, int end_col_offset, PyArena
674
- *arena);
675
- #define Slice(a0, a1, a2, a3) _Py_Slice(a0, a1, a2, a3)
676
- slice_ty _Py_Slice(expr_ty lower, expr_ty upper, expr_ty step, PyArena *arena);
677
- #define ExtSlice(a0, a1) _Py_ExtSlice(a0, a1)
678
- slice_ty _Py_ExtSlice(asdl_seq * dims, PyArena *arena);
679
- #define Index(a0, a1) _Py_Index(a0, a1)
680
- slice_ty _Py_Index(expr_ty value, PyArena *arena);
681
- #define comprehension(a0, a1, a2, a3, a4) _Py_comprehension(a0, a1, a2, a3, a4)
682
- comprehension_ty _Py_comprehension(expr_ty target, expr_ty iter, asdl_seq *
683
- ifs, int is_async, PyArena *arena);
684
- #define ExceptHandler(a0, a1, a2, a3, a4, a5, a6, a7) _Py_ExceptHandler(a0, a1, a2, a3, a4, a5, a6, a7)
685
- excepthandler_ty _Py_ExceptHandler(expr_ty type, identifier name, asdl_seq *
686
- body, int lineno, int col_offset, int
687
- end_lineno, int end_col_offset, PyArena
688
- *arena);
689
- #define arguments(a0, a1, a2, a3, a4, a5, a6, a7) _Py_arguments(a0, a1, a2, a3, a4, a5, a6, a7)
690
- arguments_ty _Py_arguments(asdl_seq * posonlyargs, asdl_seq * args, arg_ty
691
- vararg, asdl_seq * kwonlyargs, asdl_seq *
692
- kw_defaults, arg_ty kwarg, asdl_seq * defaults,
693
- PyArena *arena);
694
- #define arg(a0, a1, a2, a3, a4, a5, a6, a7) _Py_arg(a0, a1, a2, a3, a4, a5, a6, a7)
695
- arg_ty _Py_arg(identifier arg, expr_ty annotation, string type_comment, int
696
- lineno, int col_offset, int end_lineno, int end_col_offset,
697
- PyArena *arena);
698
- #define keyword(a0, a1, a2) _Py_keyword(a0, a1, a2)
699
- keyword_ty _Py_keyword(identifier arg, expr_ty value, PyArena *arena);
700
- #define alias(a0, a1, a2) _Py_alias(a0, a1, a2)
701
- alias_ty _Py_alias(identifier name, identifier asname, PyArena *arena);
702
- #define withitem(a0, a1, a2) _Py_withitem(a0, a1, a2)
703
- withitem_ty _Py_withitem(expr_ty context_expr, expr_ty optional_vars, PyArena
704
- *arena);
705
- #define TypeIgnore(a0, a1, a2) _Py_TypeIgnore(a0, a1, a2)
706
- type_ignore_ty _Py_TypeIgnore(int lineno, string tag, PyArena *arena);
707
-
708
- PyObject* PyAST_mod2obj(mod_ty t);
709
- mod_ty PyAST_obj2mod(PyObject* ast, PyArena* arena, int mode);
710
- int PyAST_Check(PyObject* obj);
711
-
712
- #ifdef __cplusplus
713
- }
714
- #endif
715
- #endif /* !Py_PYTHON_AST_H */