Skip to content

Record prods macros#2226

Merged
rv-jenkins merged 4 commits intomasterfrom
recordProdsMacros
Sep 28, 2021
Merged

Record prods macros#2226
rv-jenkins merged 4 commits intomasterfrom
recordProdsMacros

Conversation

@radumereuta
Copy link
Copy Markdown
Contributor

Fixes: #2217

  • move isMacro to outer.Module
  • don't generate sort projections for macro symbols
  • tests

- move isMacro to outer.Module
- don't generate sort projections for macro symbols
- tests
@ehildenb
Copy link
Copy Markdown
Member

Looks good to me, but @dwightguth and @SchmErik should review too.

Copy link
Copy Markdown
Contributor

@SchmErik SchmErik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me. I ended up using the macro functions that you wrote in this PR and it works well

}
})
lazy val rulesFor: Map[KLabel, Set[Rule]] = rules.groupBy(r => matchKLabel(r))
lazy val macroKLables: Set[KLabel] = rules.filter(r => r.isMacro).map(r => matchKLabel(r))
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've been trying to integrate this code into a separate issue and this code isn't getting the expected result for me. The problem is that rule productions containing macros is a "bubble" rather than a "rule"...

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nevermind - this bubble/rule issue is due to me trying to evaluate this logic too early in the kompile pipeline

@rv-jenkins rv-jenkins merged commit b6e03ab into master Sep 28, 2021
@rv-jenkins rv-jenkins deleted the recordProdsMacros branch September 28, 2021 17:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] [kompile] - macro for record production is applied to itself

5 participants