-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: fail format validation on unnecessary uppercase character classes
Check only character classes for uppercase letters in case-insensitive expressions. Other casing in assembly files can give context and it may be better to leave it as is.
- Loading branch information
Showing
4 changed files
with
99 additions
and
60 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
package utils | ||
|
||
func IsEscaped(input string, position int) bool { | ||
escapeCounter := 0 | ||
for backtrackIndex := position - 1; backtrackIndex >= 0; backtrackIndex++ { | ||
if input[backtrackIndex] != '\\' { | ||
break | ||
} | ||
escapeCounter++ | ||
} | ||
return escapeCounter%2 != 0 | ||
} |