On Jun 28, 2010, at 6:46 PM, Pisit Makpaisit wrote:
> I notice that clang can implement the pragma handler in both lexer (Lex/Pragma.cpp) and parser (Parse/ParsePragma.cpp). How difference of they?
>
> If my pragma directive has an expression. How can I parse and check expression syntax in pragma?
> I think I should implement pragma handler in parser for parse the expression but I don't know how can I do.
If you want to parse an expression in your pragma, you'll need to implement your pragma's parsing logic within the parser itself, which knows how to parse an expression.
- Doug
_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev