fpco / inline-c

284 stars 50 forks source link

Antiquoted C variables Within C/C++ Comments Are Still Parsed #54

Closed georgewsinger closed 7 years ago

georgewsinger commented 7 years ago

Small bug. Consider:

f n = ...
    where function = (\i -> [C.block| int { 
           //...commented out C code involving $(Type* t)
           return 1; } |])

This will cause the compiler to complain that "Variable not in scope: t".

bitonic commented 7 years ago

This is undesirable but intended behavior: we do not parse the the C code at all, which means that we cannot know if we're in a comment.