Skip to content

Commit

Permalink
removed unused
Browse files Browse the repository at this point in the history
  • Loading branch information
brennanjl committed Dec 19, 2024
1 parent b5d4f13 commit 4a39077
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 87 deletions.
2 changes: 1 addition & 1 deletion node/engine/parse/parse_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ func assertPositionsAreSet(t *testing.T, v any) {
RecursivelyVisitPositions(v, func(gp GetPositioner) {
pos := gp.GetPosition()
// if not set, this will tell us the struct
assert.True(t, pos.IsSet, "position is not set. struct type: %T", gp)
assert.True(t, pos.isSet, "position is not set. struct type: %T", gp)
})
}

Expand Down
19 changes: 0 additions & 19 deletions node/engine/parse/postgres/doc.go

This file was deleted.

25 changes: 0 additions & 25 deletions node/engine/parse/postgres/parse.go

This file was deleted.

22 changes: 0 additions & 22 deletions node/engine/parse/postgres/parse_cgo.go

This file was deleted.

12 changes: 0 additions & 12 deletions node/engine/parse/postgres/parse_test.go

This file was deleted.

16 changes: 8 additions & 8 deletions node/engine/parse/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,16 @@ import (
type Position struct {
// Set is true if the position of the Position has been set.
// This is useful for testing parsers.
IsSet bool `json:"-"`
StartLine int `json:"start_line"`
StartCol int `json:"start_col"`
EndLine int `json:"end_line"`
EndCol int `json:"end_col"`
isSet bool
StartLine int `json:"start_line"`
StartCol int `json:"start_col"`
EndLine int `json:"end_line"`
EndCol int `json:"end_col"`
}

// Set sets the position of the Position based on the given parser rule context.
func (n *Position) Set(r antlr.ParserRuleContext) {
n.IsSet = true
n.isSet = true
n.StartLine = r.GetStart().GetLine()
n.StartCol = r.GetStart().GetColumn()
n.EndLine = r.GetStop().GetLine()
Expand All @@ -27,7 +27,7 @@ func (n *Position) Set(r antlr.ParserRuleContext) {

// SetToken sets the position of the Position based on the given token.
func (n *Position) SetToken(t antlr.Token) {
n.IsSet = true
n.isSet = true
n.StartLine = t.GetLine()
n.StartCol = t.GetColumn()
n.EndLine = t.GetLine()
Expand All @@ -42,7 +42,7 @@ func (n *Position) GetPosition() *Position {

// Clear clears the position of the Position.
func (n *Position) Clear() {
n.IsSet = false
n.isSet = false
n.StartLine = 0
n.StartCol = 0
n.EndLine = 0
Expand Down

0 comments on commit 4a39077

Please sign in to comment.