Fixed issue with unwrapping rues
This commit is contained in:
parent
629a9a6d05
commit
60325b23a3
2
makefile
2
makefile
|
@ -11,7 +11,7 @@ run: all bin/modal
|
|||
@ bin/modal examples/hello.modal 2> /dev/null
|
||||
test: bin/modal-debug bin/modal
|
||||
@ bin/modal -v
|
||||
@ bin/modal-debug examples/tests.modal 2> /dev/null
|
||||
@ bin/modal-debug examples/tests.modal
|
||||
install: bin/modal
|
||||
cp bin/modal ~/bin/
|
||||
uninstall:
|
||||
|
|
10
src/modal.c
10
src/modal.c
|
@ -140,9 +140,13 @@ parse_frag(char *s)
|
|||
while((c = *s) && c <= ' ') s++;
|
||||
if(*s != ')' && *s != '<' && s[1] != '>') {
|
||||
ss = walk(s);
|
||||
if(*s == '(') s++, ss--;
|
||||
while(s < ss) *dict_++ = *s++;
|
||||
s++;
|
||||
if(*s == '('){
|
||||
s++;
|
||||
while(s < ss-1) *dict_++ = *s++;
|
||||
s++;
|
||||
}
|
||||
else
|
||||
while(s < ss) *dict_++ = *s++;
|
||||
}
|
||||
*dict_++ = 0;
|
||||
return s;
|
||||
|
|
Loading…
Reference in New Issue