Commit graph

3 commits

Author SHA1 Message Date
Pat Gavlin a597934b3c
Updates to the HCL2 syntax helpers. (#4282)
- Fix token mapping for template control structures
- Split tokens out into their own file
- Add factory methods for token types
2020-04-02 20:01:14 -07:00
Pat Gavlin 900379bd38
Add an HCL2 static typechecker and semantic model. (#4087)
These changes add a package for type checking and modeling HCL2
configurations. It is made up of three primary components:

1. A static type system
2. A semantic representation of HCL2 expressions and a binder from HCL2
   native syntax to this representation
3. A semantic representation of HCL2 structural elements and binders
   from HCL2 native syntax to this representation.

The type system is described in the "Extended Types" section of the
specification. The semantic representations of expressions and
structural elements are documented in their implementations.
2020-03-18 09:28:57 -07:00
Pat Gavlin f42d7e756a
Add an HCL2 syntax helper package. (#3980)
These changes add a helper package for parsing HCL2 syntax files. The
helpers are intended to provide direct access to syntax elements that
are abstracted away by the standard HCL2 parser. The bulk of the code
deals with mapping syntax nodes to their relevant tokens in order to
avoid losing information about the comments associated with syntax
nodes.
2020-02-27 12:49:15 -08:00