# HG changeset patch # User lost # Date 1231116278 0 # Node ID 309810f39ab73cca07588f19e9b5950911c09265 # Parent 89657cb3fdf85de718361743c516edff22b815e7 Implemented the * and . special symbols diff -r 89657cb3fdf8 -r 309810f39ab7 src/lwasm.c --- a/src/lwasm.c Mon Jan 05 00:40:58 2009 +0000 +++ b/src/lwasm.c Mon Jan 05 00:44:38 2009 +0000 @@ -173,6 +173,28 @@ st = state; debug_message(3, "lwasm_expr_lookup_symbol(): find '%s' (context=%d)", sym, st -> as -> context); + // check for special symbols first... + if (sym[1] == '\0') + { + switch (sym[0]) + { + // current line address + case '*': + case '.': + *val = st -> l -> codeaddr; + return 0; + + case '<': + // previous branch point + // not implemented + break; + case '>': + // next branch point + // not implemented + break; + } + } + // look for local symbol first then global symbol se = lwasm_find_symbol(st -> as, sym, st -> as -> context); if (!se)