add source location *after* initial comment

This commit is contained in:
Vítor Santos Costa 2013-11-04 00:05:29 +00:00
parent b3a4666fc2
commit c1a3bfce42

View File

@ -854,6 +854,7 @@ Yap_tokenizer(IOSTREAM *inp_stream, int store_comments, Term *tposp)
ch = getchr(inp_stream);
}
*tposp = Yap_StreamPosition(inp_stream);
Yap_setCurrentSourceLocation(&inp_stream);
LOCAL_StartLine = inp_stream->posbuf.lineno;
do {
wchar_t och;
@ -917,6 +918,7 @@ Yap_tokenizer(IOSTREAM *inp_stream, int store_comments, Term *tposp)
}
CHECK_SPACE();
*tposp = Yap_StreamPosition(inp_stream);
Yap_setCurrentSourceLocation(&inp_stream);
}
goto restart;
} else {
@ -1235,6 +1237,7 @@ Yap_tokenizer(IOSTREAM *inp_stream, int store_comments, Term *tposp)
}
CHECK_SPACE();
*tposp = Yap_StreamPosition(inp_stream);
Yap_setCurrentSourceLocation(&inp_stream);
}
}
goto restart;