Fixed issue with unwrapping rues

This commit is contained in:
Devine Lu Linvega 2024-04-15 15:58:38 -07:00
parent 629a9a6d05
commit 60325b23a3
2 changed files with 8 additions and 4 deletions

View File

@ -11,7 +11,7 @@ run: all bin/modal
@ bin/modal examples/hello.modal 2> /dev/null @ bin/modal examples/hello.modal 2> /dev/null
test: bin/modal-debug bin/modal test: bin/modal-debug bin/modal
@ bin/modal -v @ bin/modal -v
@ bin/modal-debug examples/tests.modal 2> /dev/null @ bin/modal-debug examples/tests.modal
install: bin/modal install: bin/modal
cp bin/modal ~/bin/ cp bin/modal ~/bin/
uninstall: uninstall:

View File

@ -140,9 +140,13 @@ parse_frag(char *s)
while((c = *s) && c <= ' ') s++; while((c = *s) && c <= ' ') s++;
if(*s != ')' && *s != '<' && s[1] != '>') { if(*s != ')' && *s != '<' && s[1] != '>') {
ss = walk(s); ss = walk(s);
if(*s == '(') s++, ss--; if(*s == '('){
while(s < ss) *dict_++ = *s++; s++;
s++; while(s < ss-1) *dict_++ = *s++;
s++;
}
else
while(s < ss) *dict_++ = *s++;
} }
*dict_++ = 0; *dict_++ = 0;
return s; return s;