Skip to content
Kristina Chodorow's Blog

Kristina Chodorow's Blog

Snail in a Turtleneck

Tag Archives: compilers

A Neat C Preprocessor Trick

I’ve been looking at Clang and they define lexer tokens in a way that I thought was clever. The challenge is: how do you keep a single list of language tokens but use them as both an enum and a list of strings? Clang defines C token types in a file, TokenKinds.def, with all ofContinue reading “A Neat C Preprocessor Trick”

Posted bykchodorowAugust 24, 2012Posted inProgrammingTags:compilers4 Comments on A Neat C Preprocessor Trick

Subscribe to get new posts in your email:

Kristina Chodorow's Blog, Blog at WordPress.com.
  • Follow Following
    • Kristina Chodorow's Blog
    • Already have a WordPress.com account? Log in now.
    • Kristina Chodorow's Blog
    • Customize
    • Follow Following
    • Sign up
    • Log in
    • Report this content
    • View site in Reader
    • Manage subscriptions
    • Collapse this bar