summaryrefslogtreecommitdiff
path: root/test.pl
diff options
context:
space:
mode:
Diffstat (limited to 'test.pl')
-rw-r--r--test.pl26
1 files changed, 26 insertions, 0 deletions
diff --git a/test.pl b/test.pl
new file mode 100644
index 0000000..04bcfbb
--- /dev/null
+++ b/test.pl
@@ -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