added filters:
a new statement [filter] syntax: [filter funcion_name]....[end] everything which is between [filter] and [end] is processed normally and at the end it is passed to the function (function_name) FunInfo struct has 'in' input stream now git-svn-id: svn://ttmath.org/publicrep/ezc/trunk@333 e52654a7-88a9-db11-a3e9-0013d4bc506e
This commit is contained in:
+14
-1
@@ -827,6 +827,17 @@ void Pattern::ReadDirectiveDef(Item & item)
|
||||
}
|
||||
|
||||
|
||||
void Pattern::ReadDirectiveFilter(Item & item)
|
||||
{
|
||||
item.type = Item::item_filter;
|
||||
ReadFunctions(item);
|
||||
|
||||
if( item.functions.size() != 1 )
|
||||
item.type = Item::item_err;
|
||||
}
|
||||
|
||||
|
||||
|
||||
// user defined directive
|
||||
void Pattern::ReadDirectiveNormal(const std::wstring & name, Item & item)
|
||||
{
|
||||
@@ -860,6 +871,7 @@ std::wstring name;
|
||||
else if( name == L"for" ) ReadDirectiveFor(item);
|
||||
else if( name == L"include" ) ReadDirectiveInclude(item);
|
||||
else if( name == L"def" ) ReadDirectiveDef(item);
|
||||
else if( name == L"filter" ) ReadDirectiveFilter(item);
|
||||
else if( name == L"#" ) ReadDirectiveComment(item);
|
||||
else
|
||||
ReadDirectiveNormal(name, item);
|
||||
@@ -1009,7 +1021,8 @@ void Pattern::CreateTree(Item & item)
|
||||
pitem->type == Item::item_isno )
|
||||
CreateTreeReadIf(*pitem);
|
||||
|
||||
if( pitem->type == Item::item_for )
|
||||
if( pitem->type == Item::item_for ||
|
||||
pitem->type == Item::item_filter )
|
||||
CreateTreeReadFor(*pitem);
|
||||
|
||||
if( pitem->type == Item::item_include )
|
||||
|
||||
Reference in New Issue
Block a user