Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

section 2.1.1 C/C++ macros are effectively processed before tokenization #45

Open
mikecargal opened this issue Jan 2, 2021 · 0 comments

Comments

@mikecargal
Copy link

“ As a point of comparison, it is at this stage that some languages have their macro layer, though Rust does not. For example, C/C++ macros are effectively processed at this point.2 This is why the following code works:3”

Probably nit-picking a bit here, but C/C++ “macros” are preprocessor directives. The source code is preprocessed doing textual substitutions and the results of that preprocessing are handed to the lever. So, it’s probably more correct to say that it’s before this stage that some languages have their macro layer. Perhaps, by “this stage”, you meant before tokenization, but since you’ve just described tokenization, it sounds like it’s past-tokenization.

Just $.02 of nit-picking... enjoining the book

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant