Require word-breaks before gas, value, salt, etc #42
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
In a few places, rather than relying on keywords and lexemes, we have regular expressions that begin with certain words. However, we didn't do anything to check that those words are occurring after a word-break.
For
gas
/value
/salt
I did this properly and also checked for dollar signs if negative lookbehind is available. (I also split that up a bit so it's easier to add more in the future if any more are ever added.)For
unicode
andhex
, I did things the lazy way and just used\b
; after all, if you add something to the beginning of these, it's no longer valid syntax in the first place, so I think that's probably fine, assuming we're mostly concerned with valid syntax. But, obviously, I can go back and change that if this is considered to be a problem.