summaryrefslogtreecommitdiffstats
path: root/Include/Python-ast.h
diff options
context:
space:
mode:
authorThomas Wouters <thomas@python.org>2007-02-23 19:56:57 (GMT)
committerThomas Wouters <thomas@python.org>2007-02-23 19:56:57 (GMT)
commit00e41defe8801ef37548fb60abacb3be13156d2a (patch)
tree863d072e568fee2b8f4959016b5954de457c7f4c /Include/Python-ast.h
parentcf297e46b85257396560774e5492e9d71a40f32e (diff)
downloadcpython-00e41defe8801ef37548fb60abacb3be13156d2a.zip
cpython-00e41defe8801ef37548fb60abacb3be13156d2a.tar.gz
cpython-00e41defe8801ef37548fb60abacb3be13156d2a.tar.bz2
Bytes literal.
Diffstat (limited to 'Include/Python-ast.h')
-rw-r--r--Include/Python-ast.h12
1 files changed, 9 insertions, 3 deletions
diff --git a/Include/Python-ast.h b/Include/Python-ast.h
index c2fabfb..66d7b52 100644
--- a/Include/Python-ast.h
+++ b/Include/Python-ast.h
@@ -176,9 +176,9 @@ struct _stmt {
enum _expr_kind {BoolOp_kind=1, BinOp_kind=2, UnaryOp_kind=3, Lambda_kind=4,
IfExp_kind=5, Dict_kind=6, Set_kind=7, ListComp_kind=8,
GeneratorExp_kind=9, Yield_kind=10, Compare_kind=11,
- Call_kind=12, Num_kind=13, Str_kind=14, Ellipsis_kind=15,
- Attribute_kind=16, Subscript_kind=17, Name_kind=18,
- List_kind=19, Tuple_kind=20};
+ Call_kind=12, Num_kind=13, Str_kind=14, Bytes_kind=15,
+ Ellipsis_kind=16, Attribute_kind=17, Subscript_kind=18,
+ Name_kind=19, List_kind=20, Tuple_kind=21};
struct _expr {
enum _expr_kind kind;
union {
@@ -255,6 +255,10 @@ struct _expr {
} Str;
struct {
+ string s;
+ } Bytes;
+
+ struct {
expr_ty value;
identifier attr;
expr_context_ty ctx;
@@ -465,6 +469,8 @@ expr_ty _Py_Call(expr_ty func, asdl_seq * args, asdl_seq * keywords, expr_ty
expr_ty _Py_Num(object n, int lineno, int col_offset, PyArena *arena);
#define Str(a0, a1, a2, a3) _Py_Str(a0, a1, a2, a3)
expr_ty _Py_Str(string s, int lineno, int col_offset, PyArena *arena);
+#define Bytes(a0, a1, a2, a3) _Py_Bytes(a0, a1, a2, a3)
+expr_ty _Py_Bytes(string s, int lineno, int col_offset, PyArena *arena);
#define Ellipsis(a0, a1, a2) _Py_Ellipsis(a0, a1, a2)
expr_ty _Py_Ellipsis(int lineno, int col_offset, PyArena *arena);
#define Attribute(a0, a1, a2, a3, a4, a5) _Py_Attribute(a0, a1, a2, a3, a4, a5)