Cthulhu  0.2.10
Cthulhu compiler collection
json_actions.h
Go to the documentation of this file.
1 // SPDX-License-Identifier: LGPL-3.0-only
2 #pragma once
3 
4 #include "json_scan.h"
5 
6 #include "core/analyze.h"
7 #include "core/compiler.h"
8 
10 
11 CT_LOCAL void json_action(INOUT_NOTNULL json_where_t *where, const char *text, size_t len);
13 CT_LOCAL void json_update(INOUT_NOTNULL json_where_t *where, STA_READS(steps) const json_where_t *offsets, int steps);
14 
15 #define YY_USER_ACTION json_action(yylloc, yytext, yyleng);
16 #define YYLLOC_DEFAULT(current, rhs, offset) json_update(&(current), rhs, offset)
17 #define YY_USER_INIT json_init(yylloc);
18 
20 
21 #include "interop/flex.h" // IWYU pragma: export
#define STA_READS(size)
annotate a parameter as reading expr elements
#define INOUT_NOTNULL
Definition: analyze.h:101
#define OUT_NOTNULL
Definition: analyze.h:99
#define CT_BEGIN_API
Definition: compiler.h:129
#define CT_LOCAL
Definition: compiler.h:166
#define CT_END_API
Definition: compiler.h:130
CT_LOCAL void json_init(OUT_NOTNULL json_where_t *where)
CT_LOCAL void json_update(INOUT_NOTNULL json_where_t *where, STA_READS(steps) const json_where_t *offsets, int steps)
CT_BEGIN_API CT_LOCAL void json_action(INOUT_NOTNULL json_where_t *where, const char *text, size_t len)