Commit Graph

5 Commits

Author SHA1 Message Date
Martin Atkins
a940c30903 Mechanism for introspection of source code for editors
The new "Nav" member on a zcl.File is an opaque object that can be
populated by parsers with an object that supports certain interfaces
that are not part of the main API but are useful for integration with
editors and other tooling.

As a first example of this, we replace the hack for getting context in
the diagnostic package with a new ContextString interface, which can
then be optionally implemented by a given parser to return a contextual
string native to the source language.
2017-05-19 19:33:58 -07:00
Martin Atkins
1168f36be5 json: start of low-level decoding 2017-05-19 19:33:58 -07:00
Martin Atkins
41527d1a3c Retain the bytes used to construct a file
Later on this will be useful when printing diagnostics with source code
snippets as context.
2017-05-18 08:07:52 -07:00
Martin Atkins
87677ae03a Rename "Element" to "Block"
The term "element" is already used for an item from a collection in cty,
so we'll use "block" to talk about the nested blocks in a zcl config to
reduce confusion.
2017-05-18 07:21:21 -07:00
Martin Atkins
b9183e85e4 Initial stubs of the public API 2017-05-13 17:44:11 -07:00