Mercurial > hg-old > index.cgi
comparison lwasm/symbol.c @ 411:cac204676434
Allow symbols to start with digits if they contain $, ?, or @; numbered locals
author | lost@l-w.ca |
---|---|
date | Mon, 09 Aug 2010 00:10:24 -0600 |
parents | 502fbc37ff4e |
children |
comparison
equal
deleted
inserted
replaced
410:acaafc70044b | 411:cac204676434 |
---|---|
86 | 86 |
87 debug_message(as, 200, "Register symbol %s (%02X), %s", sym, flags, lw_expr_print(val)); | 87 debug_message(as, 200, "Register symbol %s (%02X), %s", sym, flags, lw_expr_print(val)); |
88 | 88 |
89 if (!(flags & symbol_flag_nocheck)) | 89 if (!(flags & symbol_flag_nocheck)) |
90 { | 90 { |
91 if (*sym < 0x80 && !strchr(SSYMCHARS, *sym)) | 91 if (!sym || !*sym) |
92 { | |
93 lwasm_register_error(as, cl, "Bad symbol (%s)", sym); | |
94 return NULL; | |
95 } | |
96 if (*sym < 0x80 && (!strchr(SSYMCHARS, *sym) && !strchr(sym + 1, '$') && !strchr(sym + 1, '@') && !strchr(sym + 1, '?'))) | |
92 { | 97 { |
93 lwasm_register_error(as, cl, "Bad symbol (%s)", sym); | 98 lwasm_register_error(as, cl, "Bad symbol (%s)", sym); |
94 return NULL; | 99 return NULL; |
95 } | 100 } |
96 | 101 |