-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Try to wrap Engine compile function #29
Try to wrap Engine compile function #29
Conversation
ddfbc66
to
65d9d8e
Compare
native/rhai_rustler/src/ast.rs
Outdated
use rhai::AST; | ||
|
||
pub struct ASTResource { | ||
pub ast: Mutex<AST>, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
probably for AST is worth using RwLock
instead, let's keep this on the radar
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
test/rhai/engine_test.exs
Outdated
test "should not compile an invalid expression" do | ||
engine = Engine.new() | ||
|
||
assert {:error, {:parsing, "parsing error"}} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
missing = Engine.compile(engine, "$#!")
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LOL
bdecd86
to
febdfa5
Compare
As above, I'm trying to just wrap
engine.compile()
.