Skip to content

Instantly share code, notes, and snippets.

@mikebaldry
Created October 2, 2013 15:10
Show Gist options
  • Save mikebaldry/6795285 to your computer and use it in GitHub Desktop.
Save mikebaldry/6795285 to your computer and use it in GitHub Desktop.
input: testabc:abc AND x:'test abc' OR y:123 AND testing123:'something else'
expression
/ \
or <nil>
/ \________________
and \
/ \ and
testabc:abc x:'test abc' / \
y:123 testing123:'something else'
#<ExpressionNode:0x007f910791fec0
@left=
#<OrNode:0x007f910791ff10
@left=
#<AndNode:0x007f9107914958
@left=#<TermNode:0x007f9107917338 @left="testabc", @right="abc">,
@right=#<TermNode:0x007f91079149a8 @left="x", @right="'test abc'">>,
@right=
#<AndNode:0x007f910791ff60
@left=#<TermNode:0x007f910791a0d8 @left="y", @right="123">,
@right=
#<TermNode:0x007f910791ffb0
@left="testing123",
@right="'something else'">>>,
@right=nil>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment