Forked from kriszyp/operator call unification experimate
Created
May 11, 2010 20:59
-
-
Save deanlandolt/397866 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"a!=aaa" is sugar for (identical to) "a.ne(aaa)" parses to: | |
[{ | |
property:"a", | |
operator:"ne", | |
values: ["aaa"] | |
}] | |
"a=aaa" is sugar for (identical to) "a.eq(aaa)" parses to: | |
[{ | |
property:"a", | |
operator:"ne", | |
values: ["aaa"] | |
}] | |
"a=in=2" is sugar for (identical to) "a.in(2)" parses to: | |
[{ | |
property:"a", | |
operator:"in", | |
values: [2] | |
}] | |
"foo(2,4)" parses to: | |
[{ | |
operator:"foo", | |
values: [2,4] | |
}] | |
"a.b=lt=2&c=3" is sugar for (identical to) "and(a.b.lt(2),c.eq(3))" parses to (note that the top level array is always implied to be a child of "and" operator): | |
[{ | |
property:["a","b"], | |
operator:"lt", | |
values: [2] | |
}, | |
{ | |
property:"c", | |
operator:"eq" | |
} | |
] | |
"a=2|a=3" is sugar for (identical to) "or(a.eq(2),a.eq(3))" parses to: | |
[ | |
{ | |
operator:"or", | |
values:[ | |
{ | |
property:"a", | |
operator:"eq", | |
values: [2] | |
}, | |
{ | |
property:"a", | |
operator:"eq", | |
values: [3] | |
} | |
] | |
} | |
] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment