json: update stale references to "zcl"

This commit is contained in:
Martin Atkins 2018-01-27 10:51:26 -08:00
parent 5a7ff3bca2
commit 305d5f96d1
4 changed files with 5 additions and 7 deletions

View File

@ -8,7 +8,7 @@ type navigation struct {
root *objectVal root *objectVal
} }
// Implementation of zcled.ContextString // Implementation of hcled.ContextString
func (n navigation) ContextString(offset int) string { func (n navigation) ContextString(offset int) string {
steps := navigationStepsRev(n.root, offset) steps := navigationStepsRev(n.root, offset)
if steps == nil { if steps == nil {

View File

@ -168,7 +168,7 @@ Token:
} }
if colon.Type == tokenEquals { if colon.Type == tokenEquals {
// Possible confusion with native zcl syntax. // Possible confusion with native HCL syntax.
return nil, diags.Append(&hcl.Diagnostic{ return nil, diags.Append(&hcl.Diagnostic{
Severity: hcl.DiagError, Severity: hcl.DiagError,
Summary: "Missing attribute value colon", Summary: "Missing attribute value colon",

View File

@ -9,10 +9,10 @@ import (
) )
// Parse attempts to parse the given buffer as JSON and, if successful, returns // Parse attempts to parse the given buffer as JSON and, if successful, returns
// a hcl.File for the zcl configuration represented by it. // a hcl.File for the HCL configuration represented by it.
// //
// This is not a generic JSON parser. Instead, it deals only with the profile // This is not a generic JSON parser. Instead, it deals only with the profile
// of JSON used to express zcl configuration. // of JSON used to express HCL configuration.
// //
// The returned file is valid only if the returned diagnostics returns false // The returned file is valid only if the returned diagnostics returns false
// from its HasErrors method. If HasErrors returns true, the file represents // from its HasErrors method. If HasErrors returns true, the file represents

View File

@ -260,7 +260,7 @@ func (e *expression) Value(ctx *hcl.EvalContext) (cty.Value, hcl.Diagnostics) {
switch v := e.src.(type) { switch v := e.src.(type) {
case *stringVal: case *stringVal:
if ctx != nil { if ctx != nil {
// Parse string contents as a zcl native language expression. // Parse string contents as a HCL native language expression.
// We only do this if we have a context, so passing a nil context // We only do this if we have a context, so passing a nil context
// is how the caller specifies that interpolations are not allowed // is how the caller specifies that interpolations are not allowed
// and that the string should just be returned verbatim. // and that the string should just be returned verbatim.
@ -288,8 +288,6 @@ func (e *expression) Value(ctx *hcl.EvalContext) (cty.Value, hcl.Diagnostics) {
return val, diags return val, diags
} }
// FIXME: Once the native zcl template language parser is implemented,
// parse string values as templates and evaluate them.
return cty.StringVal(v.Value), nil return cty.StringVal(v.Value), nil
case *numberVal: case *numberVal:
return cty.NumberVal(v.Value), nil return cty.NumberVal(v.Value), nil