Added linebreak escape character
This commit is contained in:
parent
e786cdce58
commit
accc108817
|
@ -1,5 +1,4 @@
|
|||
<> (greeting) (Melcome to)
|
||||
<> (name) (Modal --)
|
||||
<> (?: ?: -- print) ()
|
||||
<> (lang_name) (Modal)
|
||||
<> (?: print) ()
|
||||
|
||||
greeting name print
|
||||
(Welcome to lang_name \nHave fun! \n) print
|
||||
|
|
|
@ -65,7 +65,11 @@ set_reg(int r, char *b)
|
|||
} else if(r == ':') {
|
||||
char *bb = walk(b);
|
||||
if(*b == '(') b++, --bb;
|
||||
while(b < bb) putc(*(b++), stdout);
|
||||
while(b < bb) {
|
||||
char c = *(b++);
|
||||
if(c == '\\' && *(b++) == 'n') c = 0xa;
|
||||
putc(c, stdout);
|
||||
}
|
||||
} else
|
||||
regs[r] = b;
|
||||
return 1;
|
||||
|
|
Loading…
Reference in New Issue