Renames package to jsluice

This commit is contained in:
Tom Hudson
2022-08-30 12:56:00 +01:00
parent 605d0760ea
commit ecc3d205ca
13 changed files with 17 additions and 17 deletions

View File

@@ -1,4 +1,4 @@
package jsurls
package jsluice
import (
sitter "github.com/smacker/go-tree-sitter"

View File

@@ -1,4 +1,4 @@
package jsurls
package jsluice
import "testing"

View File

@@ -1,4 +1,4 @@
package jsurls
package jsluice
import (
"net/url"

View File

@@ -1,4 +1,4 @@
package jsurls
package jsluice
import (
"testing"

View File

@@ -1,4 +1,4 @@
package jsurls
package jsluice
import (
"strings"

2
set.go
View File

@@ -1,4 +1,4 @@
package jsurls
package jsluice
type set map[string]any

View File

@@ -1,4 +1,4 @@
package jsurls
package jsluice
import (
"strconv"

View File

@@ -1,4 +1,4 @@
package jsurls
package jsluice
import (
"testing"

View File

@@ -1,4 +1,4 @@
package jsurls
package jsluice
import (
"fmt"

View File

@@ -1,4 +1,4 @@
package jsurls
package jsluice
import (
"strconv"

View File

@@ -1,4 +1,4 @@
package jsurls
package jsluice
import (
"strings"
@@ -7,9 +7,9 @@ import (
"golang.org/x/exp/slices"
)
func matchJQuery() urlMatcher {
func matchJQuery() URLMatcher {
return urlMatcher{"call_expression", func(n *sitter.Node, source []byte) *URL {
return URLMatcher{"call_expression", func(n *sitter.Node, source []byte) *URL {
callName := content(n.ChildByFieldName("function"), source)
if !slices.Contains(

View File

@@ -1,4 +1,4 @@
package jsurls
package jsluice
import (
"strings"
@@ -32,10 +32,10 @@ func (c *nodeCache) get(k *sitter.Node) ([]*sitter.Node, bool) {
return v, exists
}
func matchXHR() urlMatcher {
func matchXHR() URLMatcher {
cache := newNodeCache()
return urlMatcher{"call_expression", func(n *sitter.Node, source []byte) *URL {
return URLMatcher{"call_expression", func(n *sitter.Node, source []byte) *URL {
callName := content(n.ChildByFieldName("function"), source)
// We don't know what the XMLHttpRequest object will be called,

View File

@@ -1,4 +1,4 @@
package jsurls
package jsluice
import (
"net/url"