You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello! The version of tokei I installed via cargo (12.1.1) is incorrectly identifying .y files (for the yacc / bison parser generators) as Happy source code. It looks like the correct way to approach a fix for this is to specify the comment types in the languages.json file.
I'm willing to make these changes, but I'm not sure where to find information about the Happy language. It's hard to search for given the name. Is it this Haskell parser generator? A brief, nonexhaustive glance at the documentation doesn't yield any information about comments in that language.
Conversely, we do know the kind of comments that Bison and Yacc use, so adding information there should be easy enough.
Do I understand this correctly? If so, I can get a PR up soon. I just want to be sure I understand correctly before filing a useless PR. :)
The text was updated successfully, but these errors were encountered:
As far as I know, Happy (which is a parser generator written in Haskell, yes) would use the same comment syntax as Haskell. -- for single line and {-/-} for multi-line comments.
Thank you for your issue! I'm going to close this as a duplicate of #67. In short, yes I would like to support this, but I want to provide the way to change at runtime, as I don't want tokei to flip what extension is counted as what between versions unless it's a bug, and while it might be unintuitive that the extension is not mapped onto a language you'd expect, I don't consider that a bug.
If you'd like to make a PR implementing #67 it is more than welcome.
Hello! The version of tokei I installed via cargo (12.1.1) is incorrectly identifying .y files (for the yacc / bison parser generators) as Happy source code. It looks like the correct way to approach a fix for this is to specify the comment types in the languages.json file.
I'm willing to make these changes, but I'm not sure where to find information about the Happy language. It's hard to search for given the name. Is it this Haskell parser generator? A brief, nonexhaustive glance at the documentation doesn't yield any information about comments in that language.
Conversely, we do know the kind of comments that Bison and Yacc use, so adding information there should be easy enough.
Do I understand this correctly? If so, I can get a PR up soon. I just want to be sure I understand correctly before filing a useless PR. :)
The text was updated successfully, but these errors were encountered: