fix () extension
This commit is contained in:
parent
5cd9720593
commit
e1208fc7ad
15
C/scanner.c
15
C/scanner.c
|
@ -1306,9 +1306,18 @@ Yap_tokenizer(IOSTREAM *inp_stream, int store_comments, Term *tposp)
|
||||||
och = ch;
|
och = ch;
|
||||||
ch = getchr(inp_stream);
|
ch = getchr(inp_stream);
|
||||||
t->TokInfo = och;
|
t->TokInfo = och;
|
||||||
if (t->TokInfo == '(' && !solo_flag) {
|
if (och == '(') {
|
||||||
t->TokInfo = 'l';
|
while (chtype(ch) == BS) { ch = getchr(inp_stream); };
|
||||||
solo_flag = TRUE;
|
if (ch == ')') {
|
||||||
|
t->TokInfo = Unsigned(AtomEmptyBrackets);
|
||||||
|
t->Tok = Ord(kind = Name_tok);
|
||||||
|
ch = getchr(inp_stream);
|
||||||
|
solo_flag = FALSE;
|
||||||
|
break;
|
||||||
|
} else if (!solo_flag) {
|
||||||
|
t->TokInfo = 'l';
|
||||||
|
solo_flag = TRUE;
|
||||||
|
}
|
||||||
} else if (och == '[') {
|
} else if (och == '[') {
|
||||||
while (chtype(ch) == BS) { ch = getchr(inp_stream); };
|
while (chtype(ch) == BS) { ch = getchr(inp_stream); };
|
||||||
if (ch == ']') {
|
if (ch == ']') {
|
||||||
|
|
Reference in New Issue