Skip to content
This repository has been archived by the owner on Dec 15, 2022. It is now read-only.

Don't blindly eat tokens when trying to match destructuring assignments #82

Merged
merged 4 commits into from Oct 9, 2016

Conversation

50Wliu
Copy link
Contributor

@50Wliu 50Wliu commented Feb 5, 2016

Fixes #57

I also took the liberty of rescoping some things (for example, { is clearly not a keyword.operator).

This regex might be able to be cleaned up a bit more...I would do the following, but I'm not sure if everything that would match is valid:

'begin': '(?<=\\s|^)({)(?=(.+?)}\\s+=)'
  'beginCaptures':
    '1':
      'name': 'punctuation.definition.destructuring.begin.bracket.curly.coffee'
    '2':
      'patterns': [
        {
          # move the patterns down below up here and get rid of those
        }
      ]

Some advice from someone who's more seasoned with Coffeescript would be nice.

@50Wliu 50Wliu changed the title Don't blindly eat tokens trying to match destructuring assignments Don't blindly eat tokens when trying to match destructuring assignments Feb 5, 2016
50Wliu and others added 3 commits April 19, 2016 20:20
…erpolated-strings-colon

# Conflicts:
#	spec/coffee-script-spec.coffee
And simplify the patterns while we're at it.
@50Wliu 50Wliu merged commit ee7488d into master Oct 9, 2016
@50Wliu 50Wliu deleted the wl-interpolated-strings-colon branch October 9, 2016 01:00
@50Wliu 50Wliu mentioned this pull request Feb 7, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant