Skip to content

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

@mikecargal

Description

@mikecargal

“ 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions