mirror of
https://github.com/pragma-/pbot.git
synced 2024-11-26 22:09:26 +01:00
Oops, forget about pointers
This commit is contained in:
parent
eb371e3977
commit
63b8aae8dd
@ -65,7 +65,7 @@ if($lang eq "C" or $lang eq "C++") {
|
|||||||
my $prelude = '';
|
my $prelude = '';
|
||||||
$prelude = "$1$2" if $precode =~ s/^\s*(#.*)(#.*?[>\n])//s;
|
$prelude = "$1$2" if $precode =~ s/^\s*(#.*)(#.*?[>\n])//s;
|
||||||
|
|
||||||
while($precode =~ s/([a-zA-Z0-9_]+)\s+([a-zA-Z0-9_]+)\s*\((.*?)\)\s*{(.*?)}//) {
|
while($precode =~ s/([a-zA-Z0-9_*]+)\s+([a-zA-Z0-9_*]+)\s*\((.*?)\)\s*{(.*?)}//) {
|
||||||
my ($ret, $ident, $params, $body) = ($1, $2, $3, $4);
|
my ($ret, $ident, $params, $body) = ($1, $2, $3, $4);
|
||||||
$code .= "$ret $ident($params) { $body }\n\n";
|
$code .= "$ret $ident($params) { $body }\n\n";
|
||||||
$has_main = 1 if $ident eq 'main';
|
$has_main = 1 if $ident eq 'main';
|
||||||
|
@ -134,7 +134,7 @@ if($languages{$lang}{'id'} == 1 or $languages{$lang}{'id'} == 11 or $languages{$
|
|||||||
my $prelude = '';
|
my $prelude = '';
|
||||||
$prelude = "$1$2" if $precode =~ s/^\s*(#.*)(#.*?[>\n])//s;
|
$prelude = "$1$2" if $precode =~ s/^\s*(#.*)(#.*?[>\n])//s;
|
||||||
|
|
||||||
while($precode =~ s/([a-zA-Z0-9_]+)\s+([a-zA-Z0-9_]+)\s*\((.*?)\)\s*{(.*?)}//) {
|
while($precode =~ s/([a-zA-Z0-9_*]+)\s+([a-zA-Z0-9_*]+)\s*\((.*?)\)\s*{(.*?)}//) {
|
||||||
my ($ret, $ident, $params, $body) = ($1, $2, $3, $4);
|
my ($ret, $ident, $params, $body) = ($1, $2, $3, $4);
|
||||||
$code .= "$ret $ident($params) { $body }\n\n";
|
$code .= "$ret $ident($params) { $body }\n\n";
|
||||||
$has_main = 1 if $ident eq 'main';
|
$has_main = 1 if $ident eq 'main';
|
||||||
|
Loading…
Reference in New Issue
Block a user