Higher order strategy arguments in SpoofaxLang
SpoofaxLang does not support higher order argument strategies. The Spoofax Stratego editor also does not support them if I recall correctly, but in SpoofaxLang you can not even compile code that uses such strategies, whereas in the Spoofax Stratego editor you can just ignore the warning/error: the compiler does support higher order strategies as strategy arguments.
Examples:
abox2text’(|width) =
rules( GppIndent := 0 )
; let local-abox2text(|pos) =
abox2text’(local-abox2text | pos, width)in local-abox2text(|0) end ; Fst
Inabox2text'(local-abox2text | pos, width)
,local-abox2text
is undefined according to SpoofaxLang.
abox2text-I(rec : t * t -> t | xpos, width) =
?I(sopt, bs); {|GppIndent: <add> (xpos, <gpp-is-length> sopt) => left-xpos ; rules( GppIndent := left-xpos ) ; <fetch-elem(?SOpt(IS(), <id>)) <+ !"0"> sopt => value ; <rec(|xpos)> H([SOpt(HS(), value)], [S(""), bs]) |}
Here, inrec(|xpos)
,rec
is undefined, even though it is an argument ofabox2text-I
.Maybe relevant: https://yellowgrass.org/issue/Spoofax/117
Submitted by Tobi Vollebregt on 7 March 2012 at 15:50
Issue Log
Log in to post comments