BK-SCOSS / sctokenizer

A Source Code Tokenizer
MIT License
14 stars 5 forks source link

Problems with #if and #ifdef in C #4

Closed DieSchneegans closed 3 years ago

DieSchneegans commented 3 years ago

I tried your tokenizer and I have problems with #if and #ifdef in C programming language. I think the problem comes with your handling in lines 84 to 91 from your cpp_tokenizer.py file. You decide that all i's after a # are considered include. But that can also be an if, ifdef or ifndef.

I hope you can fix this.

ngocbh commented 3 years ago

@Dec1mo Could you fix it?

Dec1mo commented 3 years ago

Thank you, @DieSchneegans. I've fixed that. @ngocjr7 Could you review my pull request?