refactor: extract Meta class into separate module and add eval method with compile support

This commit is contained in:
Bob Nystrom
2015-10-16 01:08:56 +00:00
parent 419a5dfda0
commit c65fdb2f94
11 changed files with 119 additions and 99 deletions
+2
View File
@@ -1 +1,3 @@
import "meta" for Meta
Meta.eval("!!") // expect runtime error: Could not compile source code.
@@ -1,3 +1,5 @@
import "meta" for Meta
var y
Meta.eval("y = 2")
+2
View File
@@ -1 +1,3 @@
import "meta" for Meta
Meta.eval(123) // expect runtime error: Source code must be a string.