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
  • #65
Closed
Open
Issue created Apr 08, 2013 by Administrator@rootContributor

Argument names cannot be renamed in sub macro

Created by: tuchida

example:

macro main {
  case ($a) => {
    (function(foo) {
      var bar = 1 + foo;
      return sub($a);
    })(2);
  }
}

macro sub {
  case ($a) => {
    foo + bar + $a
  }
}

main(3);

output:

(function (foo$1) {
    var bar = 1 + foo$1;
    return foo + bar + 3;
}(2));
;

I expect return foo$1 + bar + 3; or do not rename of the foo.

(I read expander.js, but I did not find how to fix this issue. Probably, variable identifiers is not to renamed. Because getVarIdentifiers is returning an empty array.)

Assignee
Assign to
Time tracking