【问题标题】:The value of integer property of a concept is not linked or received when used through property macro in a template通过模板中的属性宏使用时,概念的整数属性的值未链接或接收
【发布时间】:2014-11-01 01:19:07
【问题描述】:

我对 MPS Jetbrains 非常陌生。而且,虽然我遵循了形状教程并尝试在同一行上实现一些东西,但我遇到了一个奇怪的错误。

一个名为“print”的概念有一个名为“data”的整数属性。在生成器文件中,我在“缩减规则”下有一个模板“reduce_print”。

template reduce_print 
input print                                          

parameters                                           
<< ... >>                                            

content node:                                        
{ 
 { 
  <TF [System.out.println($[123]);] TF> 
 } 
}

属性宏 $[123] 是来自 print 概念的 node.data。

问题是,使用 node.data 宏总是产生 0。

请帮我解决这个问题。

【问题讨论】:

    标签: mps


    【解决方案1】:

    您发布的代码对我来说很好用(当然应该)。 恐怕这个问题在这里没有提到的一些细节。例如,示例使用代码是什么样的?

    【讨论】:

      猜你喜欢
      • 2014-10-06
      • 1970-01-01
      • 1970-01-01
      • 2022-08-04
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2019-09-26
      • 1970-01-01
      相关资源
      最近更新 更多