|
|
@ -22,7 +22,7 @@ var parseTests = []parseTest{
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
{
|
|
|
|
source: `name = "jordan"`,
|
|
|
|
source: `name: "jordan"`,
|
|
|
|
root: &rootNode{
|
|
|
|
root: &rootNode{
|
|
|
|
children: []node{
|
|
|
|
children: []node{
|
|
|
|
&assignmentNode{"name", "jordan"},
|
|
|
|
&assignmentNode{"name", "jordan"},
|
|
|
@ -31,13 +31,13 @@ var parseTests = []parseTest{
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
{
|
|
|
|
source: `
|
|
|
|
source: `
|
|
|
|
hostname = "jordanorelli.com"
|
|
|
|
hostname: "jordanorelli.com"
|
|
|
|
port = 9000
|
|
|
|
port: 9000
|
|
|
|
freq = 1e9
|
|
|
|
freq: 1e9
|
|
|
|
duty = 0.2
|
|
|
|
duty: 0.2
|
|
|
|
neg = -2
|
|
|
|
neg: -2
|
|
|
|
neg2 = -2.3
|
|
|
|
neg2: -2.3
|
|
|
|
imag = 1+2i
|
|
|
|
imag: 1+2i
|
|
|
|
`,
|
|
|
|
`,
|
|
|
|
root: &rootNode{
|
|
|
|
root: &rootNode{
|
|
|
|
children: []node{
|
|
|
|
children: []node{
|
|
|
@ -53,8 +53,8 @@ var parseTests = []parseTest{
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
{
|
|
|
|
source: `
|
|
|
|
source: `
|
|
|
|
first_name = "jordan" # yep, that's my name
|
|
|
|
first_name: "jordan" # yep, that's my name
|
|
|
|
last_name = "orelli" # comments should be able to follow other shit
|
|
|
|
last_name: "orelli" # comments should be able to follow other shit
|
|
|
|
`,
|
|
|
|
`,
|
|
|
|
root: &rootNode{
|
|
|
|
root: &rootNode{
|
|
|
|
children: []node{
|
|
|
|
children: []node{
|
|
|
@ -67,7 +67,7 @@ var parseTests = []parseTest{
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
{
|
|
|
|
source: `
|
|
|
|
source: `
|
|
|
|
heroes = ["lina", "cm"]
|
|
|
|
heroes: ["lina", "cm"]
|
|
|
|
`,
|
|
|
|
`,
|
|
|
|
root: &rootNode{
|
|
|
|
root: &rootNode{
|
|
|
|
children: []node{
|
|
|
|
children: []node{
|
|
|
@ -77,7 +77,7 @@ var parseTests = []parseTest{
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
{
|
|
|
|
source: `
|
|
|
|
source: `
|
|
|
|
nested = [["one", "two"], ["three", "four"]]
|
|
|
|
nested: [["one", "two"], ["three", "four"]]
|
|
|
|
`,
|
|
|
|
`,
|
|
|
|
root: &rootNode{
|
|
|
|
root: &rootNode{
|
|
|
|
children: []node{
|
|
|
|
children: []node{
|
|
|
@ -87,7 +87,7 @@ var parseTests = []parseTest{
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
{
|
|
|
|
source: `
|
|
|
|
source: `
|
|
|
|
nested = [
|
|
|
|
nested: [
|
|
|
|
["one", "two"],
|
|
|
|
["one", "two"],
|
|
|
|
["three", "four"],
|
|
|
|
["three", "four"],
|
|
|
|
]
|
|
|
|
]
|
|
|
@ -100,7 +100,7 @@ var parseTests = []parseTest{
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
{
|
|
|
|
source: `
|
|
|
|
source: `
|
|
|
|
admin = {first_name: "jordan", last_name: "orelli"}
|
|
|
|
admin: {first_name: "jordan", last_name: "orelli"}
|
|
|
|
`,
|
|
|
|
`,
|
|
|
|
root: &rootNode{
|
|
|
|
root: &rootNode{
|
|
|
|
children: []node{
|
|
|
|
children: []node{
|
|
|
@ -113,7 +113,7 @@ var parseTests = []parseTest{
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
{
|
|
|
|
source: `
|
|
|
|
source: `
|
|
|
|
http = {
|
|
|
|
http: {
|
|
|
|
port: 9000,
|
|
|
|
port: 9000,
|
|
|
|
routes: "/path/to/some/file",
|
|
|
|
routes: "/path/to/some/file",
|
|
|
|
}
|
|
|
|
}
|
|
|
|