Support access modifiers in Swift regexes#6
Support access modifiers in Swift regexes#6frodella-daitan wants to merge 2 commits intosamdods:masterfrom
Conversation
|
Good call, but I think you should use |
|
You're right, I was trying to account for both the
My latest commit fixes that. The resulting regex turned out quite complex, so I moved the prefix handling to separate strings and then composed the complete regex using
Let me know your thoughts :) |
|
I think there's probably a way we could remove some of the repetition and simplify this more... but perhaps it would lead to less readable regex expressions - and they're already getting quite unreadable!! happy to merge, but i'll wait till i get to my main machine to run and test before merging thanks for your input :) |
The class detection mechanism would fail in cases where an access modifier was used before the class definition.
I debated using "\w*" instead of naming each possible modifier, but I feel that the latter approach is safer.