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
  • Issues
  • #715
Closed
Open
Issue created Jun 02, 2017 by Administrator@rootContributor

Sweet.js conflicts with ES6 spreads

Created by: ghost

You can try with online editor. I cannot using spreads with Sweet.

  Error: expecting a , punctuator
pointer

This code:

operator $ postfix 1 = (right) => {
  return #`${right}[0][${right}[1]]`;
};

operator $$ prefix 1 = (left) => {
  return #`...${left}`;
};

operator $p left 19 = (object, accessor) => {
  return #`[${object}, ${accessor}]`;
};

let array = [0, 1, 2];
let pointer = array $p 0;
pointer $ = 2;

let v = pointer $;

function acceptPair(array, index){
  
}

acceptPair( $$ pointer );
Assignee
Assign to
Time tracking