mirror of
https://github.com/verilator/verilator.git
synced 2026-09-03 06:03:03 +02:00
Add --preproc-token-limit (#5768)
This commit is contained in:
+3
-3
@@ -963,9 +963,9 @@ int V3PreProcImp::getRawToken() {
|
||||
if (m_lastLineno != m_lexp->m_tokFilelinep->lineno()) {
|
||||
m_lastLineno = m_lexp->m_tokFilelinep->lineno();
|
||||
m_tokensOnLine = 0;
|
||||
} else if (++m_tokensOnLine > LINE_TOKEN_MAX) {
|
||||
error("Too many preprocessor tokens on a line (>" + cvtToStr(LINE_TOKEN_MAX)
|
||||
+ "); perhaps recursive `define");
|
||||
} else if (++m_tokensOnLine > v3Global.opt.preprocTokenLimit()) {
|
||||
error("Too many preprocessor tokens on a line (>"
|
||||
+ cvtToStr(v3Global.opt.preprocTokenLimit()) + "); perhaps recursive `define");
|
||||
tok = VP_EOF_ERROR;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user