Skip to content

Commit 6fc731c

Browse files
committed
Register hcl.Expression and hcl.Traverser types
1 parent 8d307aa commit 6fc731c

File tree

1 file changed

+20
-1
lines changed

1 file changed

+20
-1
lines changed

plugin/plugin.go

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,28 @@ func (RuleSetPlugin) Client(b *plugin.MuxBroker, c *rpc.Client) (interface{}, er
3535
// In order to communicate the interface correctly with RPC,
3636
// the type of the related structure is registered in gob at the initial time.
3737
func init() {
38-
gob.Register(&hclsyntax.TemplateExpr{})
38+
// https://github.com/hashicorp/hcl/blob/v2.0.0/hclsyntax/expression.go
3939
gob.Register(&hclsyntax.LiteralValueExpr{})
4040
gob.Register(&hclsyntax.ScopeTraversalExpr{})
41+
gob.Register(&hclsyntax.RelativeTraversalExpr{})
42+
gob.Register(&hclsyntax.FunctionCallExpr{})
43+
gob.Register(&hclsyntax.ConditionalExpr{})
44+
gob.Register(&hclsyntax.IndexExpr{})
45+
gob.Register(&hclsyntax.TupleConsExpr{})
46+
gob.Register(&hclsyntax.ObjectConsExpr{})
47+
gob.Register(&hclsyntax.ObjectConsKeyExpr{})
48+
gob.Register(&hclsyntax.ForExpr{})
49+
gob.Register(&hclsyntax.SplatExpr{})
50+
// https://github.com/hashicorp/hcl/blob/v2.0.0/hclsyntax/expression_ops.go
51+
gob.Register(&hclsyntax.BinaryOpExpr{})
52+
gob.Register(&hclsyntax.UnaryOpExpr{})
53+
// https://github.com/hashicorp/hcl/blob/v2.0.0/hclsyntax/expression_template.go
54+
gob.Register(&hclsyntax.TemplateExpr{})
55+
gob.Register(&hclsyntax.TemplateJoinExpr{})
56+
gob.Register(&hclsyntax.TemplateWrapExpr{})
57+
// https://github.com/hashicorp/hcl/blob/v2.0.0/traversal.go
4158
gob.Register(hcl.TraverseRoot{})
4259
gob.Register(hcl.TraverseAttr{})
60+
gob.Register(hcl.TraverseIndex{})
61+
gob.Register(hcl.TraverseSplat{})
4362
}

0 commit comments

Comments
 (0)