summaryrefslogtreecommitdiff
path: root/nqasm.h
diff options
context:
space:
mode:
Diffstat (limited to 'nqasm.h')
-rw-r--r--nqasm.h16
1 files changed, 13 insertions, 3 deletions
diff --git a/nqasm.h b/nqasm.h
index 0bc51f7..e5a7452 100644
--- a/nqasm.h
+++ b/nqasm.h
@@ -1,15 +1,23 @@
#ifndef NQ_NQASM_H
#define NQ_NQASM_H
-#define ARG_INTEGER 0
-#define ARG_LABEL 1
-#define ARG_PC 2
+enum {
+ ARG_INTEGER,
+ ARG_LABEL,
+ ARG_PC,
+
+ ARG_UNARY_ADD,
+ ARG_UNARY_SUB,
+ ARG_UNARY_NOT,
+ ARG_UNARY_INV,
+};
struct argument {
int type;
union {
long value;
char *label;
+ const struct argument *children[1];
};
};
@@ -25,5 +33,7 @@ struct instruction {
void add_instruction(const struct instruction *);
void add_label(const char *);
+struct argument *argdup(const struct argument *);
+
#endif