Code review and suggestions for my Code Linting tool. #4496
Beakerboy
started this conversation in
Show and tell
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have a code Linting tool written in python that targets VBA. I was wondering if anyone would mind reviewing it and offering suggestions of making it better.
Here’s one thing I’ve done that smells bad, but don’t know how to make better.
getAllTokens()
, walks the list looking for errors and reports any found. I’m guessing it would be more efficient to minimize the Lexer creation and walk a CommonTokenStream once. Is there an example somewhere of passing the current stream and doing independent look backs to see (for example) if there is a space before a parenthesis? How would move the pointer to the last element in the stream…Or should I use a completely different approach, like a Listener?Beta Was this translation helpful? Give feedback.
All reactions