|
Re: Scoping for dot/path expressions [message #1084948 is a reply to message #1084909] |
Mon, 12 August 2013 08:48 |
|
Hi,
guess it should be somewthing like
class MyDslScopeProvider extends AbstractDeclarativeScopeProvider {
def IScope scope_DotExpression_tail(DotExpression exp, EReference ref) {
val head = exp.ref;
switch (head) {
MemberRef: {
val t = head.member.type
switch (t) {
Elementary: IScope::NULLSCOPE
Structure: Scopes::scopeFor(t.members)
default: IScope::NULLSCOPE
}
}
DotExpression: {
val type = head.tail.type
switch (type) {
Elementary: IScope::NULLSCOPE
Structure: Scopes::scopeFor(type.members)
default: IScope::NULLSCOPE
}
}
default:
IScope::NULLSCOPE
}
}
}
Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
|
|
|
|
|
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.04398 seconds