This commit is contained in:
Nicolas Cannasse
2013-06-07 22:38:16 +02:00
parent 20da568b4a
commit e5021de509
+2 -2
View File
@@ -5,13 +5,13 @@ Parse and evalutate Haxe expressions.
Usage :
```haxe
<pre>
var expr = "var x = 4; 1 + 2 * x";
var parser = new hscript.Parser();
var ast = parser.parseString(expr);
var interp = new hscript.Interp();
trace(interp.execute(ast));
```
</pre>
In case or parse or runtime error an `hscript.Expr.Error` is throwed. You can use `parser.line` to know the line number.