diff options
author | Michael Forney <mforney@mforney.org> | 2020-03-16 02:09:59 -0700 |
---|---|---|
committer | Michael Forney <mforney@mforney.org> | 2020-03-17 15:22:51 -0700 |
commit | bad98e94caf37db71f8114bdb8562a7caa4fb256 (patch) | |
tree | e238ce199becccaf9f940685ba8cb27c2c74737d /cc.h | |
parent | 19b816b032dfc01a49f7f86ae7c411a0f15fd2bc (diff) |
pp: Add support for macro definition and expansion
The token pasting operator `##` still needs to be implemented.
Diffstat (limited to 'cc.h')
-rw-r--r-- | cc.h | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -121,6 +121,8 @@ struct location { struct token { enum tokenkind kind; + /* whether or not the token is ineligible for expansion */ + _Bool hide; /* whether or not the token was preceeded by a space */ _Bool space; struct location loc; @@ -384,6 +386,13 @@ void scan(struct token *); /* preprocessor */ +enum ppflags { + /* preserve newlines in preprocessor output */ + PPNEWLINE = 1 << 0, +}; + +extern enum ppflags ppflags; + void ppinit(void); void next(void); |