mirror of
https://github.com/zeek/zeek.git
synced 2025-10-08 09:38:19 +00:00
binpac: Make 'nullptr' a keyword, allow values to be set to it and compared against it
This helps fix 'modernize-use-nullptr' findings in generated code.
This commit is contained in:
parent
3cf68302a2
commit
45d07641e4
8 changed files with 41 additions and 5 deletions
|
@ -21,6 +21,7 @@
|
|||
#include "pac_expr.h"
|
||||
#include "pac_flow.h"
|
||||
#include "pac_id.h"
|
||||
#include "pac_nullptr.h"
|
||||
#include "pac_number.h"
|
||||
#include "pac_output.h"
|
||||
#include "pac_param.h"
|
||||
|
@ -200,6 +201,10 @@ ESCSEQ (\\([^\n]|[0-7]{3}|x[[:xdigit:]]{2}))
|
|||
yylval.val = AnalyzerDataUnit::FLOWUNIT;
|
||||
return TOK_DATAUNIT;
|
||||
}
|
||||
<INITIAL>nullptr {
|
||||
yylval.nullp = new Nullptr();
|
||||
return TOK_NULLPTR;
|
||||
}
|
||||
<INITIAL>of return TOK_OF;
|
||||
<INITIAL>offsetof return TOK_OFFSETOF;
|
||||
<INITIAL>padding return TOK_PADDING;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue