You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
RREL is a quite flexible way to define complex lookup rules.
I found a case, where I needed some extra Python code for a custom scope provider. --> I would like to discuss a possible extension of the RREL language (in order not to program a custom scope provider for these cases).
Use case: I want to follow the model without consuming parts of my name (like ~attribute) - but instead of following all possible paths I want to select a specific fixed name for that step (like ~attribute='myname' or 'myname'~attribute: this means follow attribute if it is named 'myname').
Here we fixate a default lookup path to a TypesCollection with name builtin. This could be provided by a builtin model:
types builtin {
type i32
type i64
type f32
type f64
}
A demo model (for a possible implementation/unittest) could be
types MyTypes {
type Int
type Double
}
types OtherTypes {
type Foo
type Bar
}
activeTypes=MyTypes
using myDouble = Double
using myInt = Int # found via "regular lookup"
using myi32 = i32 # found via "default lookup"
# using myFoo = Foo # --> not found
@igordejanovic I hope the idea/use case is clear? I would be happy to discuss this. If we agree on a concrete syntax (e.g. 'name'~attribute) the implementation should be quite simple and I could provide it (+ a RREL description update).
The text was updated successfully, but these errors were encountered:
RREL is a quite flexible way to define complex lookup rules.
I found a case, where I needed some extra Python code for a custom scope provider. --> I would like to discuss a possible extension of the RREL language (in order not to program a custom scope provider for these cases).
Use case: I want to follow the model without consuming parts of my name (like
~attribute
) - but instead of following all possible paths I want to select a specific fixed name for that step (like~attribute='myname'
or'myname'~attribute
: this meansfollow
attribute
if it is named'myname'
).A possible model could be:
Here we fixate a default lookup path to a
TypesCollection
with namebuiltin
. This could be provided by a builtin model:A demo model (for a possible implementation/unittest) could be
@igordejanovic I hope the idea/use case is clear? I would be happy to discuss this. If we agree on a concrete syntax (e.g.
'name'~attribute
) the implementation should be quite simple and I could provide it (+ a RREL description update).The text was updated successfully, but these errors were encountered: