Permalink
Browse files

Clarifying status of scoping rules for includes

  • Loading branch information...
1 parent d1879c0 commit 038e7bf8160223644c751740f821d7e6cd584b01 breckinloggins committed Dec 16, 2009
Showing with 7 additions and 2 deletions.
  1. +3 −0 README
  2. +0 −2 doc/TODO
  3. +2 −0 tests/template_6.bmk
  4. +1 −0 tests/template_6.subtemplate
  5. +1 −0 tests/template_6.tst
View
3 README
@@ -51,6 +51,9 @@ Differences from CTemplate
allows neat tricks similar to the magic you can pull off with Ruby's method_missing
- Unlike in CTemplate, you can have as many FOO_separator sections as you like inside a template
and they will all be expanded in the order in which the separators are placed
+ - Block scope for marker identifiers works even for template includes. In other words, if an
+ included template references a marker not in the include template's dictionary, it will be found
+ if the including template has a dictionary entry with that name
Known Issues and Limitations for Version 0.1
--------------------------------------------
View
@@ -28,8 +28,6 @@ Version 0.1
[] Support modifier args
[] Support builtin modifiers :none and :cstring_escape
[] Add show/hide section
-[] Make sure scoping rules don't find identifiers outside separate template (e.g. greater than an
- include)
[] Add global dictionary
[] Make sure all API names are as close as possible to the CTemplate counterparts
[] Create tool for turning template files into strings in C headers
View
@@ -17,6 +17,7 @@ A person:
-----------------------------------------------
Name: John
Age: 21
+ If you can't see this there is a bug
Favorite Color = Black
Favorite Band = Pearl Jam
@@ -35,6 +36,7 @@ Again, but should be indented:
-----------------------------------------------
Name: John
Age: 21
+ If you can't see this there is a bug
Favorite Color = Black
Favorite Band = Pearl Jam
@@ -1,6 +1,7 @@
-----------------------------------------------
Name: {{Name}}
Age: {{Age}}
+ {{Extra}}
{{#Person_Favorites}}
Favorite Color = {{Color}}
Favorite Band = {{Band}}
View
@@ -14,6 +14,7 @@ Person_Favorites={
Band=Pearl Jam
Sport=Football
}
+Extra=If you can't see this there is a bug
#!}}
This template tests include sections

0 comments on commit 038e7bf

Please sign in to comment.