summaryrefslogtreecommitdiffstats
path: root/src/doctokenizer.h
diff options
context:
space:
mode:
authoralbert-github <albert.tests@gmail.com>2020-09-20 14:47:57 (GMT)
committeralbert-github <albert.tests@gmail.com>2020-09-20 14:47:57 (GMT)
commitc69542e495a01aca1cb20013d91fda78730d2153 (patch)
tree161db7833ba4ffd092242c60a3b9249c5e13f9c0 /src/doctokenizer.h
parent1206a9b9b49cdd904c1b5f003c874acd94472806 (diff)
downloadDoxygen-c69542e495a01aca1cb20013d91fda78730d2153.zip
Doxygen-c69542e495a01aca1cb20013d91fda78730d2153.tar.gz
Doxygen-c69542e495a01aca1cb20013d91fda78730d2153.tar.bz2
Miscounting lines in doctokinizer
When having a file like: ``` @page md_aa aa Last \error2 - Install \error3 ``` we get the warnings: ``` aa.md:3: warning: Found unknown command '\error2' aa.md:7: warning: Found unknown command '\error3' ``` instead of ``` aa.md:3: warning: Found unknown command '\error2' aa.md:5: warning: Found unknown command '\error3' ``` Investigation lead to that this is due to the fact that with a `REJECT` the line counter in `doctokinizer.l` is not reset. By counting the lines ourselves we can properly count the lines. (Other lexers don't have this problem as here we already do the counting ourselves)
Diffstat (limited to 'src/doctokenizer.h')
-rw-r--r--src/doctokenizer.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/doctokenizer.h b/src/doctokenizer.h
index f43cd07..235b403 100644
--- a/src/doctokenizer.h
+++ b/src/doctokenizer.h
@@ -115,12 +115,14 @@ struct TokenInfo
// globals
extern TokenInfo *g_token;
-extern int doctokenizerYYlineno;
extern FILE *doctokenizerYYin;
// helper functions
const char *tokToString(int token);
+void setDoctokinizerLineNr(int lineno);
+int getDoctokinizerLineNr(void);
+
// operations on the scanner
void doctokenizerYYFindSections(const char *input,const Definition *d,
const char *fileName);