summaryrefslogtreecommitdiff
path: root/parse/parse.h
diff options
context:
space:
mode:
authorOri Bernstein <ori@eigenstate.org>2017-07-30 18:34:52 -0700
committerOri Bernstein <ori@eigenstate.org>2017-07-30 18:40:02 -0700
commit594223c2959cc116ccc2782ebf7930677b053843 (patch)
tree82781e9646db2e51b0f096753fb49533fa8d7c2c /parse/parse.h
parent093716ff5e2ffe837793ba7c9239c64e22789ec0 (diff)
downloadmc-594223c2959cc116ccc2782ebf7930677b053843.tar.gz
Add hook into frontend for sizeof() folding.
Before, code like: const f = { var buf: byte[sizeof(int)] } would crash us, because `sizeof` would not get folded. A slightly subtle point: muse doens't install a hook here, but since it's already handling processed usefiles, the array sizes should already be prefolded for its viewing pleasure.
Diffstat (limited to 'parse/parse.h')
-rw-r--r--parse/parse.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/parse/parse.h b/parse/parse.h
index 97198a8..74abae4 100644
--- a/parse/parse.h
+++ b/parse/parse.h
@@ -573,5 +573,6 @@ extern char *objdir;
extern char **incpaths;
extern size_t nincpaths;
extern char *localincpath;
+extern size_t (*sizefn)(Node *n);
void yyerror(const char *s);