-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2 from superwall/develop
0.1.2
- Loading branch information
Showing
8 changed files
with
497 additions
and
226 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
fn main(){ | ||
fn main() { | ||
uniffi::generate_scaffolding("./src/cel.udl").unwrap(); | ||
} | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,102 @@ | ||
## AST example | ||
|
||
For convenience, here is a JSON example of an AST that can be evaluated by the library. | ||
|
||
```json | ||
{ | ||
"type": "And", | ||
"value": [ | ||
{ | ||
"type": "Relation", | ||
"value": [ | ||
{ | ||
"type": "Arithmetic", | ||
"value": [ | ||
{ | ||
"type": "Atom", | ||
"value": { | ||
"type": "Int", | ||
"value": 5 | ||
} | ||
}, | ||
{ | ||
"type": "Add" | ||
}, | ||
{ | ||
"type": "Atom", | ||
"value": { | ||
"type": "Int", | ||
"value": 3 | ||
} | ||
} | ||
] | ||
}, | ||
{ | ||
"type": "GreaterThan" | ||
}, | ||
{ | ||
"type": "Atom", | ||
"value": { | ||
"type": "Int", | ||
"value": 7 | ||
} | ||
} | ||
] | ||
}, | ||
{ | ||
"type": "Relation", | ||
"value": [ | ||
{ | ||
"type": "FunctionCall", | ||
"value": [ | ||
{ | ||
"type": "Member", | ||
"value": [ | ||
{ | ||
"type": "Ident", | ||
"value": "name" | ||
}, | ||
{ | ||
"type": "Attribute", | ||
"value": "length" | ||
} | ||
] | ||
}, | ||
null, | ||
[] | ||
] | ||
}, | ||
{ | ||
"type": "In" | ||
}, | ||
{ | ||
"type": "List", | ||
"value": [ | ||
{ | ||
"type": "Atom", | ||
"value": { | ||
"type": "Int", | ||
"value": 5 | ||
} | ||
}, | ||
{ | ||
"type": "Atom", | ||
"value": { | ||
"type": "Int", | ||
"value": 10 | ||
} | ||
}, | ||
{ | ||
"type": "Atom", | ||
"value": { | ||
"type": "Int", | ||
"value": 15 | ||
} | ||
} | ||
] | ||
} | ||
] | ||
} | ||
] | ||
} | ||
``` |
Oops, something went wrong.