2
2
###################################################################################
4
# Embperl - Copyright (c) 1997-2004 Gerald Richter / ECOS
4
# Embperl - Copyright (c) 1997-2005 Gerald Richter / ECOS
6
6
# You may distribute under the terms of either the GNU General Public
7
7
# License or the Artistic License, as specified in the Perl README file.
10
10
# IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
11
11
# WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
13
# $Id: RTF.pm,v 1.3 2004/01/23 06:50:57 richter Exp $
13
# $Id: RTF.pm 355574 2005-12-09 18:15:54Z richter $
15
15
###################################################################################
272
272
'cdatatype' => 0,
278
$self -> AddRTFCmdWithEnd ('if', 'endif',
280
perlcode => 'if (%&<noname>%) { ',
283
stackname => 'metacmd',
287
$self -> AddRTFCmdWithEnd ('else', 'endif',
289
perlcode => '} else {',
292
stackname => 'metacmd',
296
$self -> AddRTFCmdWithEnd ('elsif', 'endif',
298
perlcode => '} elsif (%&<noname>%) { ',
301
stackname => 'metacmd',
305
$self -> AddRTFCmd ('endif',
310
stackname => 'metacmd',
313
$self -> AddRTFCmdBlock ('while', 'endwhile',
315
perlcode => 'while (%&<noname>%) { ',
324
$self -> AddRTFCmdBlock ('foreach', 'endforeach',
326
perlcode => 'foreach %&<noname>% { ',
335
$self -> AddRTFCmdBlock ('do', 'until',
342
perlcode => '} until (%&<noname>%) ; ',
346
$self -> AddRTFCmd ('var',
348
compiletimeperlcode => 'use strict ; use vars qw{%%CLEANUP %&<noname>%} ; map { $CLEANUP{substr($_,1)} = 1 } qw{%&<noname>%} ;',
349
perlcode => 'use strict ;',
352
$self -> AddRTFCmd ('hidden',
354
perlcode => '_ep_hid(%$n%,%&\'<noname>%);',
357
$self -> AddRTFCmd ('syntax',
359
compiletimeperlcode => '$_[0] -> Syntax (Embperl::Syntax::GetSyntax(%&\'<noname>%, $_[0] -> SyntaxName));',
363
parsetimeperlcode => '$_[0] -> Syntax (Embperl::Syntax::GetSyntax(\'%%\', $_[0] -> SyntaxName)) ;',
366
$self -> AddRTFCmdBlock ('sub', 'endsub',
368
perlcode => 'sub _ep_sub_%&<noname>% { ',
371
stackname2 => 'subname',
372
push2 => '%&<noname>%',
376
perlcode => '}; sub %^subname% { my @_ep_save ; Embperl::Cmd::SubStart(\\$_ep_DomTree,%$q%,\\@_ep_save); my $_ep_ret = _ep_sub_%^subname% (@_); Embperl::Cmd::SubEnd(\\@_ep_save); return $_ep_ret } ; $_[0] -> ExportHash ->
380
{%^"subname%} = \&%^subname% ; ',