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
  • #313
Closed
Open
Issue created May 06, 2014 by Administrator@rootContributor

Multi-token names are broken on subsequent expansions when nested in delimiters

Created by: natefaubion

macro (->) {
  rule infix { $a:ident | $b:expr } => {
    function($a) { return $b }
  }
}

a = x -> [y -> y]

The -> inside the array is not recognize as a macro name, and dropped due to how binary ops are combined (non-expr lhs drops the operator and lhs), resulting in an obscure error. I believe it isn't recognized as a macro because of how takeLine handles delimiters. It copies the same range to all of its children. The - and > tokens thus get the exact same range (not adjacent) and getName does not recognize it as a compound name.

Assignee
Assign to
Time tracking