-
-
Notifications
You must be signed in to change notification settings - Fork 8
Open
Description
... to get the pointers to the trait import use statements in an OO construct.
Needs a new uses
array entry in the analyzeOOStructure()
method to track the use
tokens.
Array format for the getTraitImportUse()
method will be different compared to the other get*()
methods as it would just be pointers to the use
tokens, no names.
Or alternatively, the trait import use would need to be analysed and an entry be added to each imported trait name, but then, what should the token pointer be ? Still the use
token, even for multi-imports ?
Some code samples:
class MyHelloWorld
{
use TraitA;
use TraitB, TraitC; // Multi-import.
}
class Talker {
use A, B {
B::smallTalk insteadof A;
A::bigTalk insteadof B;
}
}
class Aliased_Talker {
use A, B {
B::smallTalk insteadof A;
A::bigTalk insteadof B;
B::bigTalk as talk;
}
}
class MyClass1 {
use HelloWorld { sayHello as protected; }
}
class MyClass2 {
use HelloWorld { sayHello as private myPrivateHello; }
}