0
我有一个语法可以解析容器和模块列表,然后按字母顺序生成这些容器。但是,我也想将模块名称添加到容器列表中。Xtext手动为语法添加值
例如:
With the configuration:
CONTAINER cont1;
CONTAINER cont2;
MODULE external WITH PRIORITY 1;
MODULE internal WITH PRIORITY 2;
The generated file should have:
main()
{
Container(cont1);
Container(cont2);
Container(external);
Container(internal);
}
我是能够产生什么在容器配置。但我想将模块名称“internal”和“external”合并到容器中。然后按字母顺序排序。
有没有办法在xtext中做到这一点?这是属于生成器还是属于范围部分?