changed: [ezc streams "..."] to [ezc out "..."] or just [out "..."]
the syntax has been changed, now [ezc ...] is used with [end] statement added: OutStreams<StreamType> class with a pool with output streams, the Generator::Generate() method can take it as its argument (Generator API has been changed) git-svn-id: svn://ttmath.org/publicrep/ezc/trunk@1014 e52654a7-88a9-db11-a3e9-0013d4bc506e
This commit is contained in:
@@ -791,6 +791,26 @@ void PatternParser::ReadDirectiveEzc(Item & item)
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
[out] is a shorthand for [ezc out]
|
||||
*/
|
||||
void PatternParser::ReadDirectiveOut(Item & item)
|
||||
{
|
||||
item.type = Item::item_ezc;
|
||||
item.has_function = true;
|
||||
|
||||
item.function.Clear();
|
||||
item.function.name = L"out";
|
||||
item.function.is_function = true;
|
||||
|
||||
if( !ReadParams(item.function) )
|
||||
{
|
||||
item.type = Item::item_err;
|
||||
item.function.Clear();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void PatternParser::ReadDirectiveBlock(Item & item)
|
||||
{
|
||||
item.type = Item::item_block;
|
||||
@@ -827,6 +847,7 @@ std::wstring name;
|
||||
else if( name == L"def" ) ReadDirectiveDef(item);
|
||||
else if( name == L"filter" ) ReadDirectiveFilter(item);
|
||||
else if( name == L"ezc" ) ReadDirectiveEzc(item);
|
||||
else if( name == L"out" ) ReadDirectiveOut(item);
|
||||
else if( name == L"block" ) ReadDirectiveBlock(item);
|
||||
else if( name == L"return" ) ReadDirectiveReturn(item);
|
||||
else if( name == L"#" ) ReadDirectiveComment(item);
|
||||
@@ -990,7 +1011,8 @@ void PatternParser::CreateTree(Item & item)
|
||||
CreateTreeReadIf(*pitem);
|
||||
|
||||
if( pitem->type == Item::item_for ||
|
||||
pitem->type == Item::item_filter )
|
||||
pitem->type == Item::item_filter ||
|
||||
pitem->type == Item::item_ezc )
|
||||
CreateTreeReadFor(*pitem);
|
||||
|
||||
if( pitem->type == Item::item_include )
|
||||
|
Reference in New Issue
Block a user