Closed ronaldtse closed 3 years ago
This is somewhat overlapping with #16 , probably should be done with #16 together.
SInce scope and visibility rules were already implemented in #11, it seems this can use the same implementation.
Code for find
method could look like:
def find(path)
path.split(".").reduce(self) do |acc, curr|
if acc and acc.class.method_defined? children
acc.children.find{|x| x.id == curr}
end
end
end
Looks good @zakjan ! I want to confirm whether the dot (.
) is a valid separator -- we should probably use a character that is not used in EXPRESS name definitions.
Yes, .
is a valid separator. EXPRESS name definitions can contain only letters, digits and _
.
simple_id = letter { letter | digit | ’_’ } .
Thank you @zakjan !
Given an EXPRESS file like:
I want to be able to do something like this:
@zakjan we will need documentation on how to do things like this.