[cfe-dev] End SourceLocation for multi-line Tokens?

Emerson Murphy-Hill emerson at apple.com
Thu Apr 24 08:53:19 PDT 2008


How would one get the end of a Token if it spans several lines, such  
as a BCPL comment?  I can clearly get the start position and length,  
but the token may contain any number of line breaks. I suppose I could  
use the preprocessor to get the text of the token, count the number of  
line breaks, and calculate the end line number and column, but is  
there an easier way?

Thanks,

e



More information about the cfe-dev mailing list