Write empty register name when null
This commit is contained in:
parent
865f040da3
commit
66bd58b89b
|
@ -5,5 +5,7 @@
|
|||
<> (reverse/l (?h) ?l) (str (?h ?l))
|
||||
<> (implode str ?*) (?*)
|
||||
<> ((read)) (?:)
|
||||
<> (empty-register) (?x)
|
||||
<> (explode ?*) (str (?*))
|
||||
|
||||
(implode reverse (explode hello)) (read)
|
||||
(implode reverse (explode hello)) (read) (explode hello) empty-register
|
|
@ -105,7 +105,6 @@ commit(char r)
|
|||
{
|
||||
int depth = 0;
|
||||
char c, *s = regs[(int)r];
|
||||
if(!s) return !fprintf(stderr, "?%c Empty\n", r);
|
||||
if(r == '*')
|
||||
s = plode(s);
|
||||
else if(s[0] == '(') {
|
||||
|
@ -184,7 +183,7 @@ rewrite(void)
|
|||
if(res != NULL) {
|
||||
char cc, *b = r->b;
|
||||
while((cc = *b++)) {
|
||||
if(cc == '?')
|
||||
if(cc == '?' && regs[(int)b[0]])
|
||||
commit(*b++);
|
||||
else
|
||||
*outp_++ = cc;
|
||||
|
|
Loading…
Reference in New Issue