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
  • #239
Closed
Open
Issue created Feb 05, 2014 by Administrator@rootContributor

Repeater patterns can drop leftover tokens within delims instead of failing the rule

Created by: natefaubion

macro sum {
  rule { ($num:lit ...) } => {
    $num (+) ...
  }
}

sum(1 2 3 four)
1 + 2 + 3;

The rule in sum should fail since there are leftover tokens in the parens, but it is dropping them instead. There appears to be code in matchPatterns that is supposed to handle this, but it doesn't look like it's working. I went all the way back to v0.3.0 and it was broken there too.

Assignee
Assign to
Time tracking