-
Notifications
You must be signed in to change notification settings - Fork 155
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #204 from elliotchance/0.13.x/sqlite3-fixes
Adding SQLite3 transpile as part of the build process
- Loading branch information
Showing
37 changed files
with
838 additions
and
423 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
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
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
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
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
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
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,26 @@ | ||
package ast | ||
|
||
type UnusedAttr struct { | ||
Address string | ||
Position string | ||
Children []Node | ||
} | ||
|
||
func parseUnusedAttr(line string) *UnusedAttr { | ||
groups := groupsFromRegex( | ||
"<(?P<position>.*)> unused", | ||
line, | ||
) | ||
|
||
return &UnusedAttr{ | ||
Address: groups["address"], | ||
Position: groups["position"], | ||
Children: []Node{}, | ||
} | ||
} | ||
|
||
// AddChild adds a new child node. Child nodes can then be accessed with the | ||
// Children attribute. | ||
func (n *UnusedAttr) AddChild(node Node) { | ||
n.Children = append(n.Children, node) | ||
} |
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,17 @@ | ||
package ast | ||
|
||
import ( | ||
"testing" | ||
) | ||
|
||
func TestUnusedAttr(t *testing.T) { | ||
nodes := map[string]Node{ | ||
`0x7fe3e01416d0 <col:47> unused`: &UnusedAttr{ | ||
Address: "0x7fe3e01416d0", | ||
Position: "col:47", | ||
Children: []Node{}, | ||
}, | ||
} | ||
|
||
runNodeTests(t, nodes) | ||
} |
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
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
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
Oops, something went wrong.