Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • S sweet-core
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 62
    • Issues 62
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 4
    • Merge requests 4
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • sweet-js
  • sweet-core
  • Merge requests
  • !641

Fix IdentiferExpression encountered after New/CallExpression

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Gabe Johnson requested to merge github/fork/gabejohnson/fix-trailing-call into master Feb 21, 2017
  • Overview 7
  • Commits 2
  • Pipelines 0
  • Changes 4
{
  foo = bar()
  baz = foo
}
// and
{
  foo = new bar()
  baz = foo
}

both result in:

{
  foo = baz = foo;
}

This is because after enforestation of either a CallExpression or a NewExpression the while loop in enforestLeftHandSideExpression was either entered (in the case of NewExpression) or continued (in the case of CallExpression).

This PR fixes that by breaking or returning respectively.

Fixes #600 (closed) and fixes #591 (closed)

Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: github/fork/gabejohnson/fix-trailing-call