hclsyntax: update stale references to "zcl" in comments
This commit is contained in:
parent
1f3c1e1b14
commit
385f330d4f
@ -1,7 +1,7 @@
|
||||
// Package hclsyntax contains the parser, AST, etc for zcl's native language,
|
||||
// Package hclsyntax contains the parser, AST, etc for HCL's native language,
|
||||
// as opposed to the JSON variant.
|
||||
//
|
||||
// In normal use applications should rarely depend on this package directly,
|
||||
// instead preferring the higher-level interface of the main hcl package and
|
||||
// its companion hclparse.
|
||||
// its companion package hclparse.
|
||||
package hclsyntax
|
||||
|
@ -9,7 +9,7 @@ import (
|
||||
"github.com/zclconf/go-cty/cty/function"
|
||||
)
|
||||
|
||||
// Expression is the abstract type for nodes that behave as zcl expressions.
|
||||
// Expression is the abstract type for nodes that behave as HCL expressions.
|
||||
type Expression interface {
|
||||
Node
|
||||
|
||||
|
@ -45,12 +45,12 @@ func main() {
|
||||
valResult := fd.Type.Results.List[0].Type.(*ast.SelectorExpr).X.(*ast.Ident)
|
||||
diagsResult := fd.Type.Results.List[1].Type.(*ast.SelectorExpr).X.(*ast.Ident)
|
||||
|
||||
if valResult.Name != "cty" && diagsResult.Name != "zcl" {
|
||||
if valResult.Name != "cty" && diagsResult.Name != "hcl" {
|
||||
continue
|
||||
}
|
||||
|
||||
// If we have a method called Value and its returns something in
|
||||
// cty followed by something in zcl then that's specific enough
|
||||
// If we have a method called Value and it returns something in
|
||||
// "cty" followed by something in "hcl" then that's specific enough
|
||||
// for now, even though this is not 100% exact as a correct
|
||||
// implementation of Value.
|
||||
|
||||
|
@ -9,7 +9,7 @@ type navigation struct {
|
||||
root *Body
|
||||
}
|
||||
|
||||
// Implementation of zcled.ContextString
|
||||
// Implementation of hcled.ContextString
|
||||
func (n navigation) ContextString(offset int) string {
|
||||
// We will walk our top-level blocks until we find one that contains
|
||||
// the given offset, and then construct a representation of the header
|
||||
|
@ -4,7 +4,7 @@ import (
|
||||
"github.com/hashicorp/hcl2/hcl"
|
||||
)
|
||||
|
||||
// ParseConfig parses the given buffer as a whole zcl config file, returning
|
||||
// ParseConfig parses the given buffer as a whole HCL config file, returning
|
||||
// a *hcl.File representing its contents. If HasErrors called on the returned
|
||||
// diagnostics returns true, the returned body is likely to be incomplete
|
||||
// and should therefore be used with care.
|
||||
@ -30,7 +30,7 @@ func ParseConfig(src []byte, filename string, start hcl.Pos) (*hcl.File, hcl.Dia
|
||||
}, diags
|
||||
}
|
||||
|
||||
// ParseExpression parses the given buffer as a standalone zcl expression,
|
||||
// ParseExpression parses the given buffer as a standalone HCL expression,
|
||||
// returning it as an instance of Expression.
|
||||
func ParseExpression(src []byte, filename string, start hcl.Pos) (Expression, hcl.Diagnostics) {
|
||||
tokens, diags := LexExpression(src, filename, start)
|
||||
@ -57,7 +57,7 @@ func ParseExpression(src []byte, filename string, start hcl.Pos) (Expression, hc
|
||||
return expr, diags
|
||||
}
|
||||
|
||||
// ParseTemplate parses the given buffer as a standalone zcl template,
|
||||
// ParseTemplate parses the given buffer as a standalone HCL template,
|
||||
// returning it as an instance of Expression.
|
||||
func ParseTemplate(src []byte, filename string, start hcl.Pos) (Expression, hcl.Diagnostics) {
|
||||
tokens, diags := LexTemplate(src, filename, start)
|
||||
@ -89,7 +89,7 @@ func ParseTraversalAbs(src []byte, filename string, start hcl.Pos) (hcl.Traversa
|
||||
}
|
||||
|
||||
// LexConfig performs lexical analysis on the given buffer, treating it as a
|
||||
// whole zcl config file, and returns the resulting tokens.
|
||||
// whole HCL config file, and returns the resulting tokens.
|
||||
//
|
||||
// Only minimal validation is done during lexical analysis, so the returned
|
||||
// diagnostics may include errors about lexical issues such as bad character
|
||||
@ -102,7 +102,7 @@ func LexConfig(src []byte, filename string, start hcl.Pos) (Tokens, hcl.Diagnost
|
||||
}
|
||||
|
||||
// LexExpression performs lexical analysis on the given buffer, treating it as
|
||||
// a standalone zcl expression, and returns the resulting tokens.
|
||||
// a standalone HCL expression, and returns the resulting tokens.
|
||||
//
|
||||
// Only minimal validation is done during lexical analysis, so the returned
|
||||
// diagnostics may include errors about lexical issues such as bad character
|
||||
@ -117,7 +117,7 @@ func LexExpression(src []byte, filename string, start hcl.Pos) (Tokens, hcl.Diag
|
||||
}
|
||||
|
||||
// LexTemplate performs lexical analysis on the given buffer, treating it as a
|
||||
// standalone zcl template, and returns the resulting tokens.
|
||||
// standalone HCL template, and returns the resulting tokens.
|
||||
//
|
||||
// Only minimal validation is done during lexical analysis, so the returned
|
||||
// diagnostics may include errors about lexical issues such as bad character
|
||||
|
@ -25,7 +25,7 @@ func (b *Block) AsHCLBlock() *hcl.Block {
|
||||
}
|
||||
}
|
||||
|
||||
// Body is the implementation of hcl.Body for the zcl native syntax.
|
||||
// Body is the implementation of hcl.Body for the HCL native syntax.
|
||||
type Body struct {
|
||||
Attributes Attributes
|
||||
Blocks Blocks
|
||||
|
Loading…
Reference in New Issue
Block a user