aboutsummaryrefslogtreecommitdiff
path: root/pp.c
AgeCommit message (Collapse)Author
2021-10-21pp: Separate function-like macro expansion to its own functionMichael Forney
2021-09-13Revert "Add stringconcat function to concatenate adjacent string literals"Michael Forney
This reverts commit c16f07acf655b9f4fb006d8256b4027fb5a13aa8. This incorrectly allows octal escapes to span between adjacent string literals (e.g. "\0" "1" is not the same as "\01").
2021-09-03pp: Set location column to 1 after line directiveMichael Forney
2021-09-02pp: Implement #line directives and gcc line markersMichael Forney
Fixes #66.
2021-06-28Add stringconcat function to concatenate adjacent string literalsMichael Forney
This function also ensures that the string prefixes (if any) are compatible. It should make it easier to implement wide string support.
2020-06-05Help gcc see that variables are not used uninitializedMichael Forney
2020-03-22pp: Don't add leading space for first stringized tokenMichael Forney
2020-03-22pp: Implement variadic macrosMichael Forney
2020-03-22pp: StyleMichael Forney
2020-03-18pp: Remove some unnecessary conditionalsMichael Forney
It is fine to just pass NULL, or the result of malloc(0) to free().
2020-03-18pp: Fix possible use-after-freeMichael Forney
Restructure the loop slightly to avoid accessing the macro identifier token after we have checked for the open parenthesis; it might belong to a previous macro argument that has since been freed.
2020-03-18pp: Don't expand argument tokens if we don't need themMichael Forney
2020-03-18pp: Handle #define without trailing newlineMichael Forney
2020-03-18pp: Minor style changesMichael Forney
2020-03-18pp: Finish '#' operatorMichael Forney
2020-03-17pp: Use tokencheck in a few more placesMichael Forney
2020-03-17pp: Fix some whitespace after preprocessingMichael Forney
2020-03-17pp: Add support for macro definition and expansionMichael Forney
The token pasting operator `##` still needs to be implemented.
2020-03-16token: Add tokencheck utility functionMichael Forney
This function is like expect(), but operates on a specific token and does not read the following token.
2020-03-16token: Rename some functionsMichael Forney
2020-03-16Allow multiple inputs to main compiler processMichael Forney
This way, we can implement -include in the driver by just passing an additional input to the compiler.
2019-06-18pp: Add __typeof as an alternate keyword for __typeof__Michael Forney
2019-05-24Add __attribute__ keywordMichael Forney
This will be needed for weak references and hidden visibility.
2019-05-21Handle alternate keywords in the compiler itselfMichael Forney
2019-05-13Use enum type for expect argumentMichael Forney
2019-04-29Add __asm__ keywordMichael Forney
2019-04-17Improve token descriptions in errorsMichael Forney
2019-04-04Merge headers into cc.hMichael Forney
2019-02-27Implement __typeof__.Andrew Chambers
2019-02-25Use a stack of scannersMichael Forney
This is necessary to implement the #include directive.
2019-02-24Remove unnecessary spaces in keyword listMichael Forney
This used to contain __builtin_va_list, so was longer than necessary.
2019-02-16Allow labels with same name as typedefMichael Forney
2019-02-13Make __builtin_va_list a built-in declaration, not keywordMichael Forney
2019-02-12Initial importMichael Forney