Javascript::PurePerl - Javascript Parser
use strict; use Javascript::PurePerl; my $js = q{alert('Hello World');}; my $tree = Javascript::PurePerl->new->parse($js);
Simplicistic parser for Javascript
The Javascript gets parsed and returned as an XML document using XML::LibXML. This makes tree transformations and searching through the tree much easier. The returned nodes will have an attribute name
, which contains the name of the subnode. See the included tests for examples on how to operate on the tree.
No interpretation or compilation is done on the tree yet, not even constant folding and the like.
None by default.
XML::LibXML,Parse::RecDescent, Javascript
Max Maischein <corion@cpan.org>
Copyright (C) 2003,2004 by Max Maischein
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.2 or, at your option, any later version of Perl 5 you may have available.