diff --git a/src/oberon-internals.h b/src/oberon-internals.h
index e265a79cc1b39aff1e2a6afa7d3b51913853c756..5cfaa1313777e98eb45f8fac7a14406ac67cd6c5 100644 (file)
--- a/src/oberon-internals.h
+++ b/src/oberon-internals.h
#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;
typedef struct gen_var_t gen_var_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
int initialized;
oberon_object_t * parent;
+ oberon_type_t * parent_type;
oberon_scope_t * scope; // for proc
int has_return; // for proc
oberon_scope_t * decl;
oberon_module_t * next;
+
+ gen_module_t * gen_mod;
};
typedef const char * (*ModuleImportCallback)(const char * name);
char c;
int token;
char * string;
- long integer;
+ int64_t integer;
double real;
+ bool longmode;
/*** END SCANER DATA ***/
/*** PARSER DATA ***/
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;
MODE_DEREF,
MODE_NIL,
MODE_NEW,
- MODE_REAL
+ MODE_REAL,
+ MODE_CAST
};
enum
OP_MOD,
OP_BITWISE_AND,
OP_BITWISE_XOR,
- OP_BITWISE_OP,
+ OP_BITWISE_OR,
OP_LOGIC_AND,
OP_LOGIC_OR,
int boolean;
oberon_object_t * var;
- oberon_item_t * parent;
+ oberon_expr_t * parent;
int num_args;
oberon_expr_t * args;
oberon_oper_t oper;
};
-extern void
-oberon_error(oberon_context_t * ctx, const char * fmt, ...);
-
#endif // OBERON_INTERNALS_H