From a523d4a4aa2fd223257c41e29f3da731e0072a51 Mon Sep 17 00:00:00 2001 From: Ivan Shalganov Date: Sat, 22 Feb 2014 20:34:53 +0400 Subject: [PATCH] Done #66, dev dynamic extends --- docs/syntax.md | 30 ++++++-- src/Fenom/Compiler.php | 77 ++++++------------- src/Fenom/Scope.php | 1 + src/Fenom/Template.php | 34 +++++--- src/Fenom/Tokenizer.php | 1 + tests/autoload.php | 10 +++ tests/cases/Fenom/ExtendsTemplateTest.php | 2 +- tests/cases/Fenom/ExtendsTest.php | 63 +++++++++++---- tests/cases/FenomTest.php | 6 +- .../{autoextends => extends/auto}/child.1.tpl | 0 .../{autoextends => extends/auto}/child.2.tpl | 2 +- .../{autoextends => extends/auto}/child.3.tpl | 0 .../{autoextends => extends/auto}/parent.tpl | 0 .../{autoextends => extends/auto}/use.tpl | 0 .../provider/extends/dynamic/child.1.tpl | 2 + .../provider/extends/dynamic/child.2.tpl | 4 + .../provider/extends/dynamic/child.3.tpl | 2 + .../dynamic}/parent.tpl | 0 .../provider/extends/dynamic/use.tpl | 2 + .../provider/extends/static/child.1.tpl | 2 + .../provider/extends/static/child.2.tpl | 3 + .../provider/extends/static/child.3.tpl | 2 + .../extends/static/nested/child.1.tpl | 2 + .../provider/extends/static/nested/parent.tpl | 7 ++ .../provider/extends/static/parent.tpl | 6 ++ .../resources/provider/extends/static/use.tpl | 2 + .../provider/staticextends/child.1.tpl | 2 - .../provider/staticextends/child.2.tpl | 2 - .../provider/staticextends/child.3.tpl | 2 - 29 files changed, 174 insertions(+), 92 deletions(-) rename tests/resources/provider/{autoextends => extends/auto}/child.1.tpl (100%) rename tests/resources/provider/{autoextends => extends/auto}/child.2.tpl (57%) rename tests/resources/provider/{autoextends => extends/auto}/child.3.tpl (100%) rename tests/resources/provider/{autoextends => extends/auto}/parent.tpl (100%) rename tests/resources/provider/{autoextends => extends/auto}/use.tpl (100%) create mode 100644 tests/resources/provider/extends/dynamic/child.1.tpl create mode 100644 tests/resources/provider/extends/dynamic/child.2.tpl create mode 100644 tests/resources/provider/extends/dynamic/child.3.tpl rename tests/resources/provider/{staticextends => extends/dynamic}/parent.tpl (100%) create mode 100644 tests/resources/provider/extends/dynamic/use.tpl create mode 100644 tests/resources/provider/extends/static/child.1.tpl create mode 100644 tests/resources/provider/extends/static/child.2.tpl create mode 100644 tests/resources/provider/extends/static/child.3.tpl create mode 100644 tests/resources/provider/extends/static/nested/child.1.tpl create mode 100644 tests/resources/provider/extends/static/nested/parent.tpl create mode 100644 tests/resources/provider/extends/static/parent.tpl create mode 100644 tests/resources/provider/extends/static/use.tpl delete mode 100644 tests/resources/provider/staticextends/child.1.tpl delete mode 100644 tests/resources/provider/staticextends/child.2.tpl delete mode 100644 tests/resources/provider/staticextends/child.3.tpl diff --git a/docs/syntax.md b/docs/syntax.md index f77cfe4..eb5f5f2 100644 --- a/docs/syntax.md +++ b/docs/syntax.md @@ -253,10 +253,13 @@ Tags starts with name and may have attributes e.innerHTML = text; document.body.appendChild(e); })('test'); - + +{if:ignore $js_enabled} + +{/if} ``` -Выведет +Outputs ```html