Skip to content

Commit

Permalink
更新示例
Browse files Browse the repository at this point in the history
  • Loading branch information
abbshr committed Sep 8, 2016
1 parent 333b7a1 commit 2bae264
Showing 1 changed file with 20 additions and 21 deletions.
41 changes: 20 additions & 21 deletions example.coffee
Original file line number Diff line number Diff line change
@@ -1,28 +1,27 @@
{Parser, SemanticAnalysis} = require './ooq'

query =
name:
$or: [
"john"
"baner"
]
age:
$not:
op: 'gt'
value: 30
"$or":
"type":
"$not":
"$and": [
{ op: "eq", value: "food" }
{ op: "gt", value: "z*" }
{ op: "lt", value: "m*" }
]
"location":
"$or": [
{ op: "eq", value: "New Yorks" }
{ op: "eq", value: "Missiby" }
name:
op: 'gt'
value: 5
love: 'game'
$not:
# case: 5
$xor:
home: 3
work:
$or: ['china', 'usa']
$or:
age:10
location:
$and: [
{op: 'lt', value: "dsds"}
{op: 'neq', value: 'ddd'}
]
$and:
xx: { op: 'like', value: 465 }
yy: { op: 'isNull' }


parser = new Parser query
console.log "抽象语法树 =>"
Expand Down

0 comments on commit 2bae264

Please sign in to comment.