How to check type in Spoofax
If I have defined a type like User,when I use this type in oher files,how to check whether it has be defined?
Asked by ZJG on 27 March 2013 at 05:15
1 Answer
This requires name resolution. You can define name binding and scope rules in NaBL, the Spoofax Name Binding Language. In your example, you need to define a namespace (e.g.
Answered by Guido Wachsmuth on 29 March 2013 at 02:10Type
), a pattern for terms that introduce a name (...: defines Type t
) and a pattern for terms that use a name (...: refers to Type t
).