-
Notifications
You must be signed in to change notification settings - Fork 235
[WIP] Add support for object keys, labels #307
base: master
Are you sure you want to change the base?
Conversation
MaximSokolov
commented
Jan 18, 2016
|
I mean, this does seem to clear up some of the regexes. The case/default stuff is definitely something that can be improved though, and may also allow us to match labels correctly. Can you try putting that in a separate repository (maybe |
|
Objects literals inside ternary expression fixed by using |
|
@MaximSokolov So is this ready for review, or are there more edge cases that need to be addressed? |
|
It's ready for review. However PR brings highlighting changes, so I want to add before/after info and steps to change colors before merging |
| 'begin': '''(?x) | ||
| (\\b([a-zA-Z_?.$][\\w?.$]*)) | ||
| \\s*(:)\\s* | ||
| \\b(?:(async)(?:\\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.
Can't this be (\\basync\\b)? instead?
| {tokens} = grammar.tokenizeLine('default: ') | ||
| expect(tokens[0]).toEqual value: 'default', scopes: ['source.js', 'keyword.control.js'] | ||
| it "tokenizes switch expression", -> | ||
| {tokens} = grammar.tokenizeLine('switch(1+1){}') |
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.
Pretty useless switch 😆
|
This will also need to be rebased. |
|
I'd like to mention a special case, just to make sure it gets addressed with these changes when they're done: #334 (comment) |