From f87600a7d93ee66499e0566bc9ce0bb43e91a28a Mon Sep 17 00:00:00 2001 From: Fatih Arslan Date: Wed, 24 Jan 2018 08:54:38 +0300 Subject: update zclsyntax to hclsyntax in various comments and strings These are remnants of the project HCL was forked from. --- hclwrite/parser.go | 14 +++++++------- hclwrite/tokens.go | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) (limited to 'hclwrite') diff --git a/hclwrite/parser.go b/hclwrite/parser.go index 72802d3..4a4851a 100644 --- a/hclwrite/parser.go +++ b/hclwrite/parser.go @@ -3,18 +3,18 @@ package hclwrite import ( "sort" - "github.com/hashicorp/hcl2/hcl/hclsyntax" "github.com/hashicorp/hcl2/hcl" + "github.com/hashicorp/hcl2/hcl/hclsyntax" ) // Our "parser" here is actually not doing any parsing of its own. Instead, -// it leans on the native parser in zclsyntax, and then uses the source ranges +// it leans on the native parser in hclsyntax, and then uses the source ranges // from the AST to partition the raw token sequence to match the raw tokens // up to AST nodes. // // This strategy feels somewhat counter-intuitive, since most of the work the // parser does is thrown away here, but this strategy is chosen because the -// normal parsing work done by zclsyntax is considered to be the "main case", +// normal parsing work done by hclsyntax is considered to be the "main case", // while modifying and re-printing source is more of an edge case, used only // in ancillary tools, and so it's good to keep all the main parsing logic // with the main case but keep all of the extra complexity of token wrangling @@ -30,7 +30,7 @@ func parse(src []byte, filename string, start hcl.Pos) (*File, hcl.Diagnostics) return nil, diags } - // To do our work here, we use the "native" tokens (those from zclsyntax) + // To do our work here, we use the "native" tokens (those from hclsyntax) // to match against source ranges in the AST, but ultimately produce // slices from our sequence of "writer" tokens, which contain only // *relative* position information that is more appropriate for @@ -333,7 +333,7 @@ func parseExpression(nativeExpr hclsyntax.Expression, from inputTokens) *Express } } -// writerTokens takes a sequence of tokens as produced by the main zclsyntax +// writerTokens takes a sequence of tokens as produced by the main hclsyntax // package and transforms it into an equivalent sequence of tokens using // this package's own token model. // @@ -389,7 +389,7 @@ func writerTokens(nativeTokens hclsyntax.Tokens) Tokens { // true then it will make a best effort that may produce strange results at // the boundaries. // -// Native zclsyntax tokens are used here, because they contain the necessary +// Native hclsyntax tokens are used here, because they contain the necessary // absolute position information. However, since writerTokens produces a // correlatable sequence of writer tokens, the resulting indices can be // used also to index into its result, allowing the partitioning of writer @@ -488,7 +488,7 @@ func partitionLineEndTokens(toks hclsyntax.Tokens) (afterComment, afterNewline i return len(toks), len(toks) } -// lexConfig uses the zclsyntax scanner to get a token stream and then +// lexConfig uses the hclsyntax scanner to get a token stream and then // rewrites it into this package's token model. // // Any errors produced during scanning are ignored, so the results of this diff --git a/hclwrite/tokens.go b/hclwrite/tokens.go index 18689ea..4eafbdf 100644 --- a/hclwrite/tokens.go +++ b/hclwrite/tokens.go @@ -22,7 +22,7 @@ type TokenGen interface { type TokenCallback func(*Token) // Token is a single sequence of bytes annotated with a type. It is similar -// in purpose to zclsyntax.Token, but discards the source position information +// in purpose to hclsyntax.Token, but discards the source position information // since that is not useful in code generation. type Token struct { Type hclsyntax.TokenType -- cgit v1.2.3