summaryrefslogtreecommitdiffstatshomepage
path: root/py/main.c
diff options
context:
space:
mode:
authorDamien <damien.p.george@gmail.com>2013-10-09 15:09:52 +0100
committerDamien <damien.p.george@gmail.com>2013-10-09 15:09:52 +0100
commit91d387de7df9e19bb5b00e6ad4c94790eb3422e3 (patch)
tree1af3603b73c8ab1b2dd917f1654548fc0f1aaafb /py/main.c
parentff8ed77cc12f707b6b0eb78ccc02bafb20bdf248 (diff)
downloadmicropython-91d387de7df9e19bb5b00e6ad4c94790eb3422e3.tar.gz
micropython-91d387de7df9e19bb5b00e6ad4c94790eb3422e3.zip
Improve indent/dedent error checking and reporting.
Diffstat (limited to 'py/main.c')
-rw-r--r--py/main.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/py/main.c b/py/main.c
index 7b17c38a85..cca52c4e73 100644
--- a/py/main.c
+++ b/py/main.c
@@ -31,11 +31,13 @@ int main(int argc, char **argv) {
}
} else {
py_parse_node_t pn = py_parse(lex, 0);
- //printf("----------------\n");
- //parse_node_show(pn, 0);
- //printf("----------------\n");
- py_compile(pn);
- //printf("----------------\n");
+ if (pn != PY_PARSE_NODE_NULL) {
+ //printf("----------------\n");
+ parse_node_show(pn, 0);
+ //printf("----------------\n");
+ py_compile(pn);
+ //printf("----------------\n");
+ }
}
py_lexer_free(lex);