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:
@@ -59,8 +59,18 @@ public:
|
||||
// and then we are deleting 'how_many_del' patterns
|
||||
void SetWhenDelete(size_t when_delete, size_t how_many_del);
|
||||
|
||||
// remembering a pointer to ezc functions
|
||||
// this functions (pointers to them) will be cached in patterns
|
||||
void SetEzcFunctions(TemplatesFunctions::EzcFun * fun);
|
||||
|
||||
// remembering a pointer to ezc blocks
|
||||
// this blocks (pointers to them) will be cached in patterns
|
||||
void SetEzcBlocks(Ezc::Blocks * blocks);
|
||||
|
||||
// commentary prefix/postfix used in pattern_parser
|
||||
// (when there is an error)
|
||||
void SetEzcCommentary(const std::wstring & start, const std::wstring & end);
|
||||
|
||||
// returning a pattern corresponding to the 'item'
|
||||
Ezc::Pattern * GetPattern(const Item & item);
|
||||
|
||||
@@ -79,6 +89,9 @@ public:
|
||||
// size of the current cache in use
|
||||
size_t Size();
|
||||
|
||||
// rebuild cache in all patterns
|
||||
void RebuildCache();
|
||||
|
||||
|
||||
private:
|
||||
|
||||
@@ -118,12 +131,17 @@ private:
|
||||
// how many items to delete
|
||||
size_t how_many_delete;
|
||||
|
||||
// can be null (not set directly)
|
||||
// can be null
|
||||
TemplatesFunctions::EzcFun * ezc_fun;
|
||||
|
||||
// can be null
|
||||
Ezc::Blocks * ezc_blocks;
|
||||
|
||||
// parser for patterns
|
||||
Ezc::PatternParser pattern_parser;
|
||||
|
||||
void RebuildCache(Ezc::Pattern & pattern);
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user