Skip to content

Commit

Permalink
Clarifying status of scoping rules for includes
Browse files Browse the repository at this point in the history
  • Loading branch information
breckinloggins authored and breckinloggins committed Dec 16, 2009
1 parent d1879c0 commit 038e7bf
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 2 deletions.
3 changes: 3 additions & 0 deletions README
Expand Up @@ -51,6 +51,9 @@ Differences from CTemplate
allows neat tricks similar to the magic you can pull off with Ruby's method_missing 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 - 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 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 Known Issues and Limitations for Version 0.1
-------------------------------------------- --------------------------------------------
Expand Down
2 changes: 0 additions & 2 deletions doc/TODO
Expand Up @@ -28,8 +28,6 @@ Version 0.1
[] Support modifier args [] Support modifier args
[] Support builtin modifiers :none and :cstring_escape [] Support builtin modifiers :none and :cstring_escape
[] Add show/hide section [] Add show/hide section
[] Make sure scoping rules don't find identifiers outside separate template (e.g. greater than an
include)
[] Add global dictionary [] Add global dictionary
[] Make sure all API names are as close as possible to the CTemplate counterparts [] 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 [] Create tool for turning template files into strings in C headers
Expand Down
2 changes: 2 additions & 0 deletions tests/template_6.bmk
Expand Up @@ -17,6 +17,7 @@ A person:
----------------------------------------------- -----------------------------------------------
Name: John Name: John
Age: 21 Age: 21
If you can't see this there is a bug


Favorite Color = Black Favorite Color = Black
Favorite Band = Pearl Jam Favorite Band = Pearl Jam
Expand All @@ -35,6 +36,7 @@ Again, but should be indented:
----------------------------------------------- -----------------------------------------------
Name: John Name: John
Age: 21 Age: 21
If you can't see this there is a bug


Favorite Color = Black Favorite Color = Black
Favorite Band = Pearl Jam Favorite Band = Pearl Jam
Expand Down
1 change: 1 addition & 0 deletions tests/template_6.subtemplate
@@ -1,6 +1,7 @@
----------------------------------------------- -----------------------------------------------
Name: {{Name}} Name: {{Name}}
Age: {{Age}} Age: {{Age}}
{{Extra}}
{{#Person_Favorites}} {{#Person_Favorites}}
Favorite Color = {{Color}} Favorite Color = {{Color}}
Favorite Band = {{Band}} Favorite Band = {{Band}}
Expand Down
1 change: 1 addition & 0 deletions tests/template_6.tst
Expand Up @@ -14,6 +14,7 @@ Person_Favorites={
Band=Pearl Jam Band=Pearl Jam
Sport=Football Sport=Football
} }
Extra=If you can't see this there is a bug
#!}} #!}}
This template tests include sections This template tests include sections


Expand Down

0 comments on commit 038e7bf

Please sign in to comment.