diff options
| author | Robert Bieber <robby@bieberphoto.com> | 2010-05-29 00:04:04 +0000 |
|---|---|---|
| committer | Robert Bieber <robby@bieberphoto.com> | 2010-05-29 00:04:04 +0000 |
| commit | 6980c1e9988a7c959876ad77b760e042272a9ec2 (patch) | |
| tree | 3b9ca757bfe83f8bef1ac9bcf544b1d47b542e8e /utils/themeeditor/main.cpp | |
| parent | 1dcc21d8466a6279ff79c8b9ee02bc5cfc7f5167 (diff) | |
| download | rockbox-6980c1e9988a7c959876ad77b760e042272a9ec2.zip rockbox-6980c1e9988a7c959876ad77b760e042272a9ec2.tar.gz rockbox-6980c1e9988a7c959876ad77b760e042272a9ec2.tar.bz2 rockbox-6980c1e9988a7c959876ad77b760e042272a9ec2.tar.xz | |
Theme Editor: Got code generation tentatively working along with a solid C++ tree structure for WPS parse trees
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26367 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'utils/themeeditor/main.cpp')
| -rw-r--r-- | utils/themeeditor/main.cpp | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/utils/themeeditor/main.cpp b/utils/themeeditor/main.cpp index 49e870c..27ce2da 100644 --- a/utils/themeeditor/main.cpp +++ b/utils/themeeditor/main.cpp @@ -27,6 +27,7 @@ extern "C" #include <cstdlib> #include <cstdio> +#include <iostream> #include <QtGui/QApplication> #include <QTreeView> @@ -36,15 +37,21 @@ extern "C" int main(int argc, char* argv[]) { - char doc[] = "%Vd(U);Hey\n%?bl(test,3,5,2,1)<param2|param3>"; + char doc[] = "#Comment\n%Vd(U);Hey\n%?bl(test,3,5,2,1)<param2|param3>"; struct skin_element* test = skin_parse(doc); - skin_debug_tree(test); + ParseTreeNode tree(test); + std::cout << "----" << std::endl; + if(std::string(doc) == tree.genCode().toStdString()) + std::cout << "Code in/out matches" << std::endl; + else + std::cout << "Match error" << std::endl; - skin_free_tree(test); + skin_free_tree(test); +/* QApplication app(argc, argv); QTreeView tree; @@ -53,7 +60,7 @@ int main(int argc, char* argv[]) tree.show(); return app.exec(); - +*/ return 0; } |