-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
decoder: bootstrap Expression implementations
- Loading branch information
1 parent
fbf7e72
commit 5b41891
Showing
14 changed files
with
543 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
package decoder | ||
|
||
import ( | ||
"context" | ||
|
||
"github.com/hashicorp/hcl-lang/lang" | ||
"github.com/hashicorp/hcl-lang/reference" | ||
"github.com/hashicorp/hcl-lang/schema" | ||
"github.com/hashicorp/hcl/v2" | ||
) | ||
|
||
type Keyword struct { | ||
expr hcl.Expression | ||
cons schema.Keyword | ||
} | ||
|
||
func (kw Keyword) CompletionAtPos(ctx context.Context, pos hcl.Pos) []lang.Candidate { | ||
// TODO | ||
return nil | ||
} | ||
|
||
func (kw Keyword) HoverAtPos(ctx context.Context, pos hcl.Pos) *lang.HoverData { | ||
// TODO | ||
return nil | ||
} | ||
|
||
func (kw Keyword) SemanticTokens(ctx context.Context) []lang.SemanticToken { | ||
// TODO | ||
return nil | ||
} | ||
|
||
func (kw Keyword) ReferenceOrigins(allowSelfRefs bool) reference.Origins { | ||
// TODO | ||
return nil | ||
} | ||
|
||
func (kw Keyword) ReferenceTargets(attrAddr *schema.AttributeAddrSchema) reference.Targets { | ||
// TODO | ||
return nil | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
package decoder | ||
|
||
import ( | ||
"context" | ||
|
||
"github.com/hashicorp/hcl-lang/lang" | ||
"github.com/hashicorp/hcl-lang/reference" | ||
"github.com/hashicorp/hcl-lang/schema" | ||
"github.com/hashicorp/hcl/v2" | ||
) | ||
|
||
type List struct { | ||
expr hcl.Expression | ||
cons schema.List | ||
} | ||
|
||
func (l List) CompletionAtPos(ctx context.Context, pos hcl.Pos) []lang.Candidate { | ||
// TODO | ||
return nil | ||
} | ||
|
||
func (l List) HoverAtPos(ctx context.Context, pos hcl.Pos) *lang.HoverData { | ||
// TODO | ||
return nil | ||
} | ||
|
||
func (l List) SemanticTokens(ctx context.Context) []lang.SemanticToken { | ||
// TODO | ||
return nil | ||
} | ||
|
||
func (l List) ReferenceOrigins(allowSelfRefs bool) reference.Origins { | ||
// TODO | ||
return nil | ||
} | ||
|
||
func (l List) ReferenceTargets(attrAddr *schema.AttributeAddrSchema) reference.Targets { | ||
// TODO | ||
return nil | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
package decoder | ||
|
||
import ( | ||
"context" | ||
|
||
"github.com/hashicorp/hcl-lang/lang" | ||
"github.com/hashicorp/hcl-lang/reference" | ||
"github.com/hashicorp/hcl-lang/schema" | ||
"github.com/hashicorp/hcl/v2" | ||
) | ||
|
||
type LiteralType struct { | ||
expr hcl.Expression | ||
cons schema.LiteralType | ||
} | ||
|
||
func (lt LiteralType) CompletionAtPos(ctx context.Context, pos hcl.Pos) []lang.Candidate { | ||
// TODO | ||
return nil | ||
} | ||
|
||
func (lt LiteralType) HoverAtPos(ctx context.Context, pos hcl.Pos) *lang.HoverData { | ||
// TODO | ||
return nil | ||
} | ||
|
||
func (lt LiteralType) SemanticTokens(ctx context.Context) []lang.SemanticToken { | ||
// TODO | ||
return nil | ||
} | ||
|
||
func (lt LiteralType) ReferenceOrigins(allowSelfRefs bool) reference.Origins { | ||
// TODO | ||
return nil | ||
} | ||
|
||
func (lt LiteralType) ReferenceTargets(attrAddr *schema.AttributeAddrSchema) reference.Targets { | ||
// TODO | ||
return nil | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
package decoder | ||
|
||
import ( | ||
"context" | ||
|
||
"github.com/hashicorp/hcl-lang/lang" | ||
"github.com/hashicorp/hcl-lang/reference" | ||
"github.com/hashicorp/hcl-lang/schema" | ||
"github.com/hashicorp/hcl/v2" | ||
) | ||
|
||
type LiteralValue struct { | ||
expr hcl.Expression | ||
cons schema.LiteralValue | ||
} | ||
|
||
func (lv LiteralValue) CompletionAtPos(ctx context.Context, pos hcl.Pos) []lang.Candidate { | ||
// TODO | ||
return nil | ||
} | ||
|
||
func (lv LiteralValue) HoverAtPos(ctx context.Context, pos hcl.Pos) *lang.HoverData { | ||
// TODO | ||
return nil | ||
} | ||
|
||
func (lv LiteralValue) SemanticTokens(ctx context.Context) []lang.SemanticToken { | ||
// TODO | ||
return nil | ||
} | ||
|
||
func (lv LiteralValue) ReferenceOrigins(allowSelfRefs bool) reference.Origins { | ||
// TODO | ||
return nil | ||
} | ||
|
||
func (lv LiteralValue) ReferenceTargets(attrAddr *schema.AttributeAddrSchema) reference.Targets { | ||
// TODO | ||
return nil | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
package decoder | ||
|
||
import ( | ||
"context" | ||
|
||
"github.com/hashicorp/hcl-lang/lang" | ||
"github.com/hashicorp/hcl-lang/reference" | ||
"github.com/hashicorp/hcl-lang/schema" | ||
"github.com/hashicorp/hcl/v2" | ||
) | ||
|
||
type Map struct { | ||
expr hcl.Expression | ||
cons schema.Map | ||
} | ||
|
||
func (m Map) CompletionAtPos(ctx context.Context, pos hcl.Pos) []lang.Candidate { | ||
// TODO | ||
return nil | ||
} | ||
|
||
func (m Map) HoverAtPos(ctx context.Context, pos hcl.Pos) *lang.HoverData { | ||
// TODO | ||
return nil | ||
} | ||
|
||
func (m Map) SemanticTokens(ctx context.Context) []lang.SemanticToken { | ||
// TODO | ||
return nil | ||
} | ||
|
||
func (m Map) ReferenceOrigins(allowSelfRefs bool) reference.Origins { | ||
// TODO | ||
return nil | ||
} | ||
|
||
func (m Map) ReferenceTargets(attrAddr *schema.AttributeAddrSchema) reference.Targets { | ||
// TODO | ||
return nil | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
package decoder | ||
|
||
import ( | ||
"context" | ||
|
||
"github.com/hashicorp/hcl-lang/lang" | ||
"github.com/hashicorp/hcl-lang/reference" | ||
"github.com/hashicorp/hcl-lang/schema" | ||
"github.com/hashicorp/hcl/v2" | ||
) | ||
|
||
type Object struct { | ||
expr hcl.Expression | ||
cons schema.Object | ||
} | ||
|
||
func (obj Object) CompletionAtPos(ctx context.Context, pos hcl.Pos) []lang.Candidate { | ||
// TODO | ||
return nil | ||
} | ||
|
||
func (obj Object) HoverAtPos(ctx context.Context, pos hcl.Pos) *lang.HoverData { | ||
// TODO | ||
return nil | ||
} | ||
|
||
func (obj Object) SemanticTokens(ctx context.Context) []lang.SemanticToken { | ||
// TODO | ||
return nil | ||
} | ||
|
||
func (obj Object) ReferenceOrigins(allowSelfRefs bool) reference.Origins { | ||
// TODO | ||
return nil | ||
} | ||
|
||
func (obj Object) ReferenceTargets(attrAddr *schema.AttributeAddrSchema) reference.Targets { | ||
// TODO | ||
return nil | ||
} | ||
|
||
type ObjectAttributes struct { | ||
expr hcl.Expression | ||
cons schema.ObjectAttributes | ||
} | ||
|
||
func (oa ObjectAttributes) CompletionAtPos(ctx context.Context, pos hcl.Pos) []lang.Candidate { | ||
// TODO | ||
return nil | ||
} | ||
|
||
func (oa ObjectAttributes) HoverAtPos(ctx context.Context, pos hcl.Pos) *lang.HoverData { | ||
// TODO | ||
return nil | ||
} | ||
|
||
func (oa ObjectAttributes) SemanticTokens(ctx context.Context) []lang.SemanticToken { | ||
// TODO | ||
return nil | ||
} | ||
|
||
func (oa ObjectAttributes) ReferenceOrigins(allowSelfRefs bool) reference.Origins { | ||
// TODO | ||
return nil | ||
} | ||
|
||
func (oa ObjectAttributes) ReferenceTargets(attrAddr *schema.AttributeAddrSchema) reference.Targets { | ||
// TODO | ||
return nil | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
package decoder | ||
|
||
import ( | ||
"context" | ||
|
||
"github.com/hashicorp/hcl-lang/lang" | ||
"github.com/hashicorp/hcl-lang/reference" | ||
"github.com/hashicorp/hcl-lang/schema" | ||
"github.com/hashicorp/hcl/v2" | ||
) | ||
|
||
type OneOf struct { | ||
expr hcl.Expression | ||
cons schema.OneOf | ||
} | ||
|
||
func (oo OneOf) CompletionAtPos(ctx context.Context, pos hcl.Pos) []lang.Candidate { | ||
// TODO | ||
return nil | ||
} | ||
|
||
func (oo OneOf) HoverAtPos(ctx context.Context, pos hcl.Pos) *lang.HoverData { | ||
// TODO | ||
return nil | ||
} | ||
|
||
func (oo OneOf) SemanticTokens(ctx context.Context) []lang.SemanticToken { | ||
// TODO | ||
return nil | ||
} | ||
|
||
func (oo OneOf) ReferenceOrigins(allowSelfRefs bool) reference.Origins { | ||
// TODO | ||
return nil | ||
} | ||
|
||
func (oo OneOf) ReferenceTargets(attrAddr *schema.AttributeAddrSchema) reference.Targets { | ||
// TODO | ||
return nil | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
package decoder | ||
|
||
import ( | ||
"context" | ||
|
||
"github.com/hashicorp/hcl-lang/lang" | ||
"github.com/hashicorp/hcl-lang/reference" | ||
"github.com/hashicorp/hcl-lang/schema" | ||
"github.com/hashicorp/hcl/v2" | ||
) | ||
|
||
type Reference struct { | ||
expr hcl.Expression | ||
cons schema.Reference | ||
} | ||
|
||
func (ref Reference) CompletionAtPos(ctx context.Context, pos hcl.Pos) []lang.Candidate { | ||
// TODO | ||
return nil | ||
} | ||
|
||
func (ref Reference) HoverAtPos(ctx context.Context, pos hcl.Pos) *lang.HoverData { | ||
// TODO | ||
return nil | ||
} | ||
|
||
func (ref Reference) SemanticTokens(ctx context.Context) []lang.SemanticToken { | ||
// TODO | ||
return nil | ||
} | ||
|
||
func (ref Reference) ReferenceOrigins(allowSelfRefs bool) reference.Origins { | ||
// TODO | ||
return nil | ||
} | ||
|
||
func (ref Reference) ReferenceTargets(attrAddr *schema.AttributeAddrSchema) reference.Targets { | ||
// TODO | ||
return nil | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
package decoder | ||
|
||
import ( | ||
"context" | ||
|
||
"github.com/hashicorp/hcl-lang/lang" | ||
"github.com/hashicorp/hcl-lang/reference" | ||
"github.com/hashicorp/hcl-lang/schema" | ||
"github.com/hashicorp/hcl/v2" | ||
) | ||
|
||
type Set struct { | ||
expr hcl.Expression | ||
cons schema.Set | ||
} | ||
|
||
func (s Set) CompletionAtPos(ctx context.Context, pos hcl.Pos) []lang.Candidate { | ||
// TODO | ||
return nil | ||
} | ||
|
||
func (s Set) HoverAtPos(ctx context.Context, pos hcl.Pos) *lang.HoverData { | ||
// TODO | ||
return nil | ||
} | ||
|
||
func (s Set) SemanticTokens(ctx context.Context) []lang.SemanticToken { | ||
// TODO | ||
return nil | ||
} | ||
|
||
func (s Set) ReferenceOrigins(allowSelfRefs bool) reference.Origins { | ||
// TODO | ||
return nil | ||
} | ||
|
||
func (s Set) ReferenceTargets(attrAddr *schema.AttributeAddrSchema) reference.Targets { | ||
// TODO | ||
return nil | ||
} |
Oops, something went wrong.