DEADSOFTWARE

Удалены бэкэнды dummy и libgccjit. Копилятор теперь ориенторован только для jvm и...
[dsw-obn.git] / src / oberon-internals.h
index a6174c36094ea7e23fb510bfc65036953917c743..5cfaa1313777e98eb45f8fac7a14406ac67cd6c5 100644 (file)
@@ -1,6 +1,9 @@
 #ifndef OBERON_INTERNALS_H
 #define OBERON_INTERNALS_H
 
+#include <stdint.h>
+#include <stdbool.h>
+
 typedef struct gen_module_t gen_module_t;
 typedef struct gen_proc_t gen_proc_t;
 typedef struct gen_type_t gen_type_t;
@@ -24,8 +27,9 @@ struct oberon_scope_t
        oberon_object_t * list;
        oberon_scope_t * up;
 
-       oberon_object_t * parent;
        int local;
+       oberon_object_t * parent;
+       oberon_type_t * parent_type;
 };
 
 enum
@@ -83,6 +87,7 @@ struct oberon_object_t
        int initialized;
 
        oberon_object_t * parent;
+       oberon_type_t * parent_type;
 
        oberon_scope_t * scope; // for proc
        int has_return; // for proc
@@ -123,8 +128,9 @@ struct oberon_context_t
        char c;
        int token;
        char * string;
-       long integer;
+       int64_t integer;
        double real;
+       bool longmode;
        /*** END SCANER DATA ***/
 
        /*** PARSER DATA ***/
@@ -132,11 +138,16 @@ struct oberon_context_t
        oberon_module_t * mod;
        /*** END PARSER DATA ***/
 
-       oberon_type_t * int_type;
        oberon_type_t * bool_type;
+       oberon_type_t * byte_type;
+       oberon_type_t * shortint_type;
+       oberon_type_t * int_type;
+       oberon_type_t * longint_type;
        oberon_type_t * real_type;
+       oberon_type_t * longreal_type;
        oberon_type_t * void_type;
        oberon_type_t * void_ptr_type;
+
        oberon_scope_t * world_scope;
        oberon_module_t * module_list;
        ModuleImportCallback import_module;
@@ -154,7 +165,8 @@ enum
        MODE_DEREF,
        MODE_NIL,
        MODE_NEW,
-       MODE_REAL
+       MODE_REAL,
+       MODE_CAST
 };
 
 enum
@@ -196,7 +208,7 @@ struct oberon_item_t
        int boolean;
        oberon_object_t * var;
 
-       oberon_item_t * parent;
+       oberon_expr_t * parent;
 
        int num_args;
        oberon_expr_t * args;
@@ -227,7 +239,4 @@ union oberon_expr_t
        oberon_oper_t oper;
 };
 
-extern void
-oberon_error(oberon_context_t * ctx, const char * fmt, ...);
-
 #endif // OBERON_INTERNALS_H