aboutsummaryrefslogtreecommitdiffstats
path: root/program.h
diff options
context:
space:
mode:
authorAdam Branes <adam@adam>2021-05-02 17:45:58 +0300
committerAdam Branes <adam@adam>2021-05-02 17:45:58 +0300
commita3e36c1918e63761dfc4d2221cca3636b98e93aa (patch)
tree143722876a02156b0b423de6248298b5cf8c0707 /program.h
downloadMEGATRON-a3e36c1918e63761dfc4d2221cca3636b98e93aa.tar.gz
initial housekeeping done
Diffstat (limited to 'program.h')
-rw-r--r--program.h35
1 files changed, 35 insertions, 0 deletions
diff --git a/program.h b/program.h
new file mode 100644
index 0000000..dfb5098
--- /dev/null
+++ b/program.h
@@ -0,0 +1,35 @@
+#ifndef PROGRAM_H
+#define PROGRAM_H
+#include "queue.h"
+
+struct Source
+{
+ char *src_name;
+ char *src;
+ size_t src_size;
+
+};
+
+struct Options
+{
+ int print_tokens:1;
+};
+
+struct Translation_Data
+{
+ struct Queue *errors;
+ struct Queue *tokens;
+};
+
+struct Source* extract_source(char *src_name);
+struct Translation_Data* get_translation_data();
+struct Source* get_source();
+struct Options* get_options();
+
+
+void destroy_translation_data(struct Translation_Data *data);
+void destroy_source(struct Source *src);
+void destroy_options(struct Options *options);
+
+
+#endif