NAME
Language::Expr::Compiler::JS
VERSION
version 0.05
DESCRIPTION
Compiles Language::Expr expression to JS code. Some notes:
Currently strings are rudimentary escaped.
Data dumping modules can't be used currently due to segfaults (at least in 5.10.1).
Variables by default simply use JavaScript variables.
E.g. $a becomes $a, and so on. Be careful not to make variables which are invalid in JavaScript, e.g. $.. or ${foo/bar}.
You can subclass and override rule_var() if you want to provide your own variables.
Functions by default simply use Perl functions.
ATTRIBUTES
todo => ARRAYREF
Used to remember which subexpression need to be parsed later.
METHODS
perl($expr) => $perl_code
Convert Language::Expr expression into Perl code. Dies if there is syntax error in expression.
AUTHOR
Steven Haryanto <stevenharyanto@gmail.com>
COPYRIGHT AND LICENSE
This software is copyright (c) 2010 by Steven Haryanto.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.