aboutsummaryrefslogtreecommitdiff
path: root/sys/cmd/cc/cc.h
diff options
context:
space:
mode:
Diffstat (limited to 'sys/cmd/cc/cc.h')
-rw-r--r--sys/cmd/cc/cc.h69
1 files changed, 35 insertions, 34 deletions
diff --git a/sys/cmd/cc/cc.h b/sys/cmd/cc/cc.h
index 7c9d679..1412302 100644
--- a/sys/cmd/cc/cc.h
+++ b/sys/cmd/cc/cc.h
@@ -326,7 +326,7 @@ enum
/* unary postfix ops */
Xpostinc, Xpostdec, Xindex, Xcall, Xsel, Xcmpndlit,
/* binary ops */
- Xoror, Xandand, Xor, Xxor, Xand, Xeql, Xgt, Xlt, Xgteq, Xlteq, Xlsft, Xrsft,
+ Xoror, Xandand, Xor, Xxor, Xand, Xneq, Xeql, Xgt, Xlt, Xgteq, Xlteq, Xlsft, Xrsft,
Xadd, Xsub, Xmul, Xdiv, Xmod,
/* primary */
Xparen, Xident, Xlit,
@@ -346,6 +346,40 @@ enum
Ncall = iota(3),
};
+/* expressions */
+struct Expr
+{
+ struct Node;
+ uint64 type;
+ union {
+ struct {
+ Expr *l;
+ Expr *r;
+ } asn;
+ struct {
+ Expr *c;
+ Expr *t;
+ Expr *e;
+ } cond;
+ union {
+ Expr *pre;
+ Expr *post;
+ } unary;
+ struct {
+ uint64 to;
+ Expr *x;
+ } cast;
+ struct {
+ Expr *l;
+ Expr *r;
+ } binary;
+ struct {
+ Expr *x[2];
+ } comma;
+ };
+};
+
+
/* statements */
struct Stmt
{
@@ -381,39 +415,6 @@ struct Stmt
};
};
-/* expressions */
-struct Expr
-{
- struct Node;
- uint64 type;
- union {
- struct {
- Expr *l;
- Expr *r;
- } asn;
- struct {
- Expr *c;
- Expr *t;
- Expr *e;
- } cond;
- union {
- Expr *pre;
- Expr *post;
- } unary;
- struct {
- uint64 to;
- Expr *x;
- } cast;
- struct {
- Expr *l;
- Expr *r;
- } binary;
- struct {
- Expr *x[2];
- } comma;
- };
-};
-
/* declarations */
struct Ptr