<- Back to shtanton's homepage
aboutsummaryrefslogtreecommitdiff
path: root/walk
diff options
context:
space:
mode:
authorCharlie Stanton <charlie@shtanton.xyz>2023-03-05 09:08:01 +0000
committerCharlie Stanton <charlie@shtanton.xyz>2023-03-05 09:08:01 +0000
commit62b61b1ea2bc8c5e5d447ddc4529b7977439804a (patch)
tree4c51a52b6a0efc21ce1660bc8cbc2255d42039db /walk
parent97b616176598e1d68f261f354ce4de60008a422f (diff)
downloadstred-go-62b61b1ea2bc8c5e5d447ddc4529b7977439804a.tar
Renames walk.Datum to walk.Atom
Diffstat (limited to 'walk')
-rw-r--r--walk/walk.go18
1 files changed, 9 insertions, 9 deletions
diff --git a/walk/walk.go b/walk/walk.go
index a9b40b7..d71ae44 100644
--- a/walk/walk.go
+++ b/walk/walk.go
@@ -16,7 +16,7 @@ const (
MapBegin
MapEnd
)
-func (value TerminalValue) Pieces(out chan<- Datum) {
+func (value TerminalValue) Pieces(out chan<- Atom) {
out<-value
}
func (value TerminalValue) String() string {
@@ -35,14 +35,14 @@ func (value TerminalValue) String() string {
}
type ValueNull struct {}
-func (value ValueNull) Pieces(out chan<- Datum) {
+func (value ValueNull) Pieces(out chan<- Atom) {
out<-value
}
func (value ValueNull) String() string {
return "null"
}
type ValueBool bool
-func (value ValueBool) Pieces(out chan<- Datum) {
+func (value ValueBool) Pieces(out chan<- Atom) {
out<-value
}
func (value ValueBool) String() string {
@@ -53,7 +53,7 @@ func (value ValueBool) String() string {
}
}
type ValueNumber float64
-func (value ValueNumber) Pieces(out chan<- Datum) {
+func (value ValueNumber) Pieces(out chan<- Atom) {
out<-value
}
func (value ValueNumber) String() string {
@@ -64,7 +64,7 @@ func (value ValueNumber) String() string {
type StartString struct {}
type EndString struct {}
type ValueString string
-func (value ValueString) Pieces(out chan<- Datum) {
+func (value ValueString) Pieces(out chan<- Atom) {
out<-StartString{}
for _, char := range value {
out<-char
@@ -75,10 +75,10 @@ func (value ValueString) String() string {
return fmt.Sprintf("\"%s\"", string(value))
}
-type Datum interface {}
+type Atom interface {}
type WalkValue interface {
- Pieces(out chan<- Datum)
+ Pieces(out chan<- Atom)
String() string
}
@@ -374,6 +374,6 @@ func JsonOut(in chan WalkItem) {
fmt.Print("\n")
}
-func ConcatData(first []Datum, second []Datum) []Datum {
- return append(append([]Datum(nil), first...), second...)
+func ConcatData(first []Atom, second []Atom) []Atom {
+ return append(append([]Atom(nil), first...), second...)
}