Commit Graph

8 Commits

Author SHA1 Message Date
Martin Atkins
4e18e3a8a8 zcl: allow nil Variables in EvalContext
it's acceptable to have "Variables" set to nil in an EvalContext, if
a particular scope has no variables at all. If _no_ contexts in the
chain have non-nil variables, this is considered to mean that variables
are not allowed at all, which produces a different error message.
2017-06-16 07:15:14 -07:00
Martin Atkins
9340e6da4e zcl: TraverseAbs through parent scopes
An EvalContext can have a parent, so it's necessary to walk up until
the root is reached in case a parent scope defines the name we're
looking for.
2017-06-14 08:54:12 -07:00
Martin Atkins
68aa56c795 zcl: Implement Traversal.TraverseAbs 2017-06-05 07:55:33 -07:00
Martin Atkins
36eacf5110 zcl: Factor the index operation out into its own function
Indexing is pretty fundamental and it's also non-trivial, so having this
exposed will make it easier for it to be implemented consistently across
many different callers, including within calling applications.
2017-06-05 07:31:59 -07:00
Martin Atkins
6bf26fc9cc Update cty references to its new home in the zclconf github account 2017-05-27 17:35:44 -07:00
Martin Atkins
73b5ba8089 TraverseSplat Traverser placeholder
This will eventually deal with splats in traversals, but isn't yet
properly implemented.
2017-05-22 18:48:06 -07:00
Martin Atkins
a2d829cafc TraverseIndex traverser implementation 2017-05-22 17:54:58 -07:00
Martin Atkins
c1815fd6e4 Start of work on Traversals
Traversals are a generalized way to talk about paths taken from the scope
and from arbitrary values. These will be used for various analysis tasks,
such as determining what needs to be placed into a scope.
2017-05-22 08:05:19 -07:00