added: two options to the config:

ezc_error_prefix (string)
        ezc_error_postfix (string)
        // prefix and postfix used when there is an error in Ezc patterns
        // default:
        // prefix:  "<!-- "
        // postfix: " -->"
added:  Ezc::Blocks to templates
added:  although patterns have pointers to functions and blocks cached
        the Ezc::Generator should use SetFunctions() and SetBlocks() method
        in order to correctly recognize variables (aliases)




git-svn-id: svn://ttmath.org/publicrep/winix/trunk@978 e52654a7-88a9-db11-a3e9-0013d4bc506e
This commit is contained in:
2014-10-19 21:20:09 +00:00
parent 5266a7e4e5
commit fb18b2238e
27 changed files with 1105 additions and 949 deletions

View File

@@ -332,15 +332,7 @@ void item_run(Info & i)
Ezc::Pattern * p = pattern_cacher.GetPattern(cur->request->item);
item_run_content.Clear();
ezc_generator.TrimWhite(gen_trim_white);
ezc_generator.SkipNewLine(gen_skip_new_line);
ezc_generator.RecognizeSpecialChars(gen_use_special_chars);
ezc_generator.SetMax(config->ezc_max_elements, config->ezc_max_loop_elements);
/*
* !! IMPROVE ME
* add blocks and variables
* hmm may they are not needed here?
*/
InitGenerator(ezc_generator);
ezc_generator.SetPattern(*p);
ezc_generator.Generate(item_run_content);
@@ -735,15 +727,7 @@ void item_tab_run(Info & i)
{
Ezc::Pattern * p = pattern_cacher.GetPattern(cur->request->item_tab[item_index]);
item_run_content.Clear();
ezc_generator.TrimWhite(gen_trim_white);
ezc_generator.SkipNewLine(gen_skip_new_line);
ezc_generator.RecognizeSpecialChars(gen_use_special_chars);
ezc_generator.SetMax(config->ezc_max_elements, config->ezc_max_loop_elements);
/*
* !! IMPROVE ME
* add blocks and variables
* hmm may they are not needed here?
*/
InitGenerator(ezc_generator);
ezc_generator.SetPattern(*p);
ezc_generator.Generate(item_run_content);
item_print_content(i.out, item_run_content.Str(), cur->request->item_tab[item_index].content_type);