diff options
Diffstat (limited to 'test.pl')
-rw-r--r-- | test.pl | 26 |
1 files changed, 26 insertions, 0 deletions
@@ -0,0 +1,26 @@ +#!/usr/bin/perl +use strict; +use warnings; +use lib '../Tree-Template-Declare/blib/lib/'; +use lib '../Tree-Transform-XSLTish/blib/lib/'; +use lib './lib'; +use Parser; +use Compiler; + +sub Tree::DAG_Node::XPath::Root::xpath_get_root_node { return $_[0] } +sub Tree::DAG_Node::XPath::Root::xpath_get_parent_node { return } + +my $src=do {local $/;<DATA>}; +print $src,"----\n\n"; +#$::RD_TRACE=1; +my $doc=Parser::parse(\$src); +print "\n----\n$src----\n"; +print map "$_\n", @{$doc->draw_ascii_tree}; +print "\n----\n"; +my $comp=Compiler->new(); +print $comp->transform($doc); + +__DATA__ +gino = 5 +if 5 + 3 then pino else rino +pino: print gino |