mirror of
https://github.com/featurebasedb/featurebase.git
synced 2026-09-07 09:05:55 +00:00
minor grammar fix
This commit is contained in:
parent
3cb3a065dd
commit
2a8f2c2026
3 changed files with 284 additions and 350 deletions
|
|
@ -75,7 +75,7 @@ func TestParser_Parse(t *testing.T) {
|
|||
|
||||
// Parse with only arguments.
|
||||
t.Run("ArgumentsOnly", func(t *testing.T) {
|
||||
q, err := pql.ParseString("MyCall( key= value, foo='bar', age = 12 , bool0=true, bool1=false, x=null, escape='\\escape\n' )")
|
||||
q, err := pql.ParseString(`MyCall( key= value, foo='bar', age = 12 , bool0=true, bool1=false, x=null, escape="\" \\escape\n" )`)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
} else if !reflect.DeepEqual(q.Calls[0],
|
||||
|
|
@ -88,7 +88,7 @@ func TestParser_Parse(t *testing.T) {
|
|||
"bool0": true,
|
||||
"bool1": false,
|
||||
"x": nil,
|
||||
"escape": "\\escape\n",
|
||||
"escape": `\" \\escape\n`,
|
||||
},
|
||||
},
|
||||
) {
|
||||
|
|
|
|||
|
|
@ -49,8 +49,8 @@ item <- ( 'null' &(comma / sp close) { p.addVal(nil) }
|
|||
/ '\'' < singlequotedstring > '\'' { p.addVal(buffer[begin:end]) }
|
||||
)
|
||||
|
||||
doublequotedstring <- ( [^"] / '\\n' / '\\\"' / '\\\'' / '\\\\' )*
|
||||
singlequotedstring <- ( [^'] / '\\n' / '\\\"' / '\\\'' / '\\\\' )*
|
||||
doublequotedstring <- ( '\\\"' / [^"] )*
|
||||
singlequotedstring <- ( '\\\'' / [^'] )*
|
||||
|
||||
fieldExpr <- [[A-Z]] ( [[A-Z]] / [0-9] / '_' / '-' )*
|
||||
field <- <fieldExpr / reserved> { p.addField(buffer[begin:end]) }
|
||||
|
|
|
|||
626
pql/pql.peg.go
626
pql/pql.peg.go
File diff suppressed because it is too large
Load diff
Loading…
Add table
Reference in a new issue