X-Git-Url: https://deadsoftware.ru/gitweb?a=blobdiff_plain;f=src%2Foberon.c;h=07c83c28643623df555292ca429fa5eba776ae9d;hb=0570527a2279ee6bd14b4c08e653b6d68369475a;hp=d6aefad6c94437641293674e57a730b7de2656e0;hpb=ba8ed2cfa675b23cb19cba538f719a07a79ffb7f;p=dsw-obn.git diff --git a/src/oberon.c b/src/oberon.c index d6aefad..07c83c2 100644 --- a/src/oberon.c +++ b/src/oberon.c @@ -359,7 +359,7 @@ oberon_read_ident(oberon_context_t * ctx) int start = ctx -> code_index; oberon_get_char(ctx); - while(isalnum(ctx -> c)) + while(isalnum(ctx -> c) || ctx -> c == '_') { oberon_get_char(ctx); } @@ -890,7 +890,7 @@ oberon_read_token(oberon_context_t * ctx) oberon_skip_space(ctx); int c = ctx -> c; - if(isalpha(c)) + if(isalpha(c) || c == '_') { oberon_read_ident(ctx); } @@ -4490,6 +4490,9 @@ register_default_types(oberon_context_t * ctx) ctx -> system_byte_type = oberon_new_type_ptr(OBERON_TYPE_SYSTEM_BYTE); oberon_generator_init_type(ctx, ctx -> system_byte_type); + ctx -> system_ptr_type = oberon_new_type_ptr(OBERON_TYPE_SYSTEM_PTR); + oberon_generator_init_type(ctx, ctx -> system_ptr_type); + /* LONG / SHORT support */ ctx -> byte_type -> shorter = NULL; ctx -> byte_type -> longer = ctx -> shortint_type; @@ -4618,6 +4621,7 @@ oberon_create_context(ModuleImportCallback import_module) /* Types */ oberon_new_intrinsic_type(ctx, "BYTE", ctx -> system_byte_type); + oberon_new_intrinsic_type(ctx, "PTR", ctx -> system_ptr_type); oberon_end_intrinsic_module(ctx, ctx -> system_module);