ITADN

Zip map requires i0 and i in the argument list

#320Opendynaxis 创建于 2024-06-28
D
dynaxiscommented
According to the user guide: ```stringtemplate parens(x) ::= "(<x>)" main() ::= "<["a", "b", "c"]:parens()>" ``` works fine. But the following doesn't: ```stringtemplate parens(x, y) ::= "(<x>, <y>)" main() ::= "<["a", "b", "c"], ["1", "2", "3"]:parens()>" ``` The error says `parens` requires `i0` and `i`. So the following works: ```stringtemplate parens(x, y, i, i0) ::= "(<x>, <y>)" main() ::= "<["a", "b", "c"], ["1", "2", "3"]:parens()>" ``` Considering the same works with anonymous template as follows: ```stringtemplate parens(x, y) ::= "(<x>, <y>)" main() ::= "<["a", "b", "c"], ["1", "2", "3"]:{x, y | parens(x, y) }>" ``` I think the named template must also work without bridging with an anonymous template.
0 条评论