Commit Graph

16 Commits

Author SHA1 Message Date
Martin Atkins
fa06f40141 zclsyntax: ForExpr.Value implementation for object construction
The tuple path is not yet implemented and will panic.
2017-06-14 08:56:28 -07:00
Martin Atkins
9be04673c3 zclsyntax: UnaryOpExpr.Value 2017-06-12 07:13:17 -07:00
Martin Atkins
e709d7bcc0 zclsyntax: operations are now pointers to a struct value
Previously operations were an enum, but we've ended up needing to store
a collection of values against each, so an operation being a pointer to
a struct feels more natural.

This in turn allows us to more easily fix the return types of the
operations, so that we don't need to do any unusual work to understand
that (for example) arithmetic always returns a number.
2017-06-12 07:09:24 -07:00
Martin Atkins
c332084224 zclsyntax: BinaryOpExpr.Value 2017-06-11 18:55:27 -07:00
Martin Atkins
34be20cc5d zclsyntax: ScopeTraversalExpr.Value implementation, and tests 2017-06-05 08:02:54 -07:00
Martin Atkins
ace387f5f9 zclsyntax: evaluation of relative traversal and index nodes 2017-06-05 07:41:02 -07:00
Martin Atkins
6f2bd0009c zclsyntax: parsing and evaluation for object constructors 2017-06-04 16:14:02 -07:00
Martin Atkins
c3f4694e06 zclsyntax: parsing and evaluation of tuple constructors 2017-06-04 14:22:51 -07:00
Martin Atkins
a1368a4d4d zclsyntax: parsing of function call expressions 2017-06-02 07:55:03 -07:00
Martin Atkins
6052cb9938 zclsyntax: parse expressions in newline-ignoring mode
This applies both two the whole of bare expressions and to any nested
expressions within parentheses. The latter means that an attribute value
can span over multiple lines if it's wrapped in parens:

    foo = (
        1 + 2 + 3 + 4 + 5
    )
2017-06-02 07:26:45 -07:00
Martin Atkins
8532fe32e6 zclsyntax: basic parsing and evaluation of string templates
Control sequences are not yet supported, but interpolation sequences work.
2017-06-01 08:01:12 -07:00
Martin Atkins
7f27d7b324 zclsyntax: parsing of boolean/null literals and root variable references 2017-06-01 06:56:45 -07:00
Martin Atkins
085dff2472 zclsyntax: start of testing expression evaluation 2017-05-31 19:27:16 -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
308eb3a291 Relocate into the "zclconf" github account 2017-05-27 17:33:09 -07:00
Martin Atkins
2b442985cd zclsyntax: FunctionCallExpr.Value
This is the first non-trivial expression Value implementation. Lots of
code here, so hopefully while implementing other expressions some
opportunities emerge to factor out some of these details.
2017-05-25 08:14:43 -07:00