-
Notifications
You must be signed in to change notification settings - Fork 235
Conversation
@@ -126,7 +126,11 @@ | |||
} | |||
{ | |||
'comment': 'ES6 export: `export default (variable|class|function, etc.)`' | |||
'match': '(?x) \\b(export)\\b \\s* \\b(default)\\b (?:\\s*) \\b((?!\\bfunction\\b|\\bclass\\b|\\blet\\b|\\bvar\\b|\\bconst\\b)[a-zA-Z_$][a-zA-Z_$0-9]*)?\\b' | |||
'match': '''(?x) | |||
\\b(export)\\b \\s* |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think these spaces are needed, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
* Simplified character classes for matching variable names: [a-zA-Z_$][a-zA-Z_$0-9]* -> [a-zA-Z_$][\\w$]* * Extended patterns now use triple-quoted blocks consistently * Lengthy patterns converted into extended patterns for readability
@50Wliu I've shot the spaces into orbit, disregard my earlier comment. =) |
@MaximSokolov Can you check if there're any conflicts between this PR and #408? |
Closes #276.
... okay, I literally asked that the same time you submitted your PR to my branch. Flawless timing. @50Wliu There're keywords missing from the support-constant groups, which I'm planning on submitting in a follow-up PR (which fixes a few other bugs as well). I've isolated all cosmetic changes to this branch in an effort to keep a cleaner revision history. I also fixed a few typos in the matching groups and eliminated the nested subpatterns. Oniguruma processes fixed-length lists faster than nested ones, so stuff like |
There is no conflict |
Stellar. Спасибо! |
Trivial changes to code formatting that were prompted by feedback to an earlier PR.
Summary:
Simplified character classes for matching variable names:
Extended patterns now use triple-quoted blocks consistently
Lengthy patterns converted into extended patterns to clarify