added: new function for ezc templating:
void space_value_noescape(Info & i, PT::Space & space) git-svn-id: svn://ttmath.org/publicrep/winix/trunk@846 e52654a7-88a9-db11-a3e9-0013d4bc506e
This commit is contained in:
parent
0d0f12b394
commit
2c38fe180e
|
@ -129,12 +129,32 @@ void space(Info & i, PT::Space & space)
|
|||
if( value )
|
||||
i.out << *value;
|
||||
else
|
||||
log << log1 << "nie ma takiej wartosci" << logend;
|
||||
log << log1 << "nie ma takiej wartosci" << logend; // only for testing
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void space_value_noescape(Info & i, PT::Space & space)
|
||||
{
|
||||
space_check_reqid();
|
||||
|
||||
if( !i.params.empty() )
|
||||
{
|
||||
SpaceInfo & space_info = spaces_map[&space];
|
||||
space_init(i.params, space, space_info);
|
||||
|
||||
if( space_info.last_space )
|
||||
{
|
||||
const std::wstring & param = i.params.back();
|
||||
const std::wstring * value = space_info.last_space->GetValue(param);
|
||||
|
||||
if( value )
|
||||
i.out << R(*value);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -263,6 +283,8 @@ void spaces_tab(Info & i, PT::Space & space)
|
|||
{
|
||||
SpaceStackItem & stack_item = spaces_tab_info.stack_tab[spaces_tab_info.cur_stack];
|
||||
|
||||
// !! CHECK ME there was a change in EZC lately
|
||||
// make sure this still is ok
|
||||
// i.iter is different for each [for] statement (implemented in EZC)
|
||||
// so we don't have to remember it in our stack
|
||||
// for each the same space we have only one item in the stack, e.g.
|
||||
|
|
|
@ -14,13 +14,18 @@
|
|||
namespace TemplatesFunctions
|
||||
{
|
||||
|
||||
// !! rename to 'space_value'
|
||||
void space(Info & i, PT::Space & space);
|
||||
void space_value_noescape(Info & i, PT::Space & space);
|
||||
|
||||
// !! rename to 'space_value_tab' etc.
|
||||
void spaces_tab(Info & i, PT::Space & space);
|
||||
void spaces_tab_value(Info & i, PT::Space & space);
|
||||
void spaces_tab_has_next(Info & i, PT::Space & space);
|
||||
|
||||
|
||||
// !! add space_tab (iteration through spaces)
|
||||
|
||||
|
||||
|
||||
} // namespace TemplatesFunctions
|
||||
|
|
Loading…
Reference in New Issue