mirror of
https://github.com/pragma-/pbot.git
synced 2024-12-24 11:42:35 +01:00
CGrammar: Change parameter declarations from "int i
" to "i
as int"
This commit is contained in:
parent
c18af75b63
commit
f137294429
@ -13,7 +13,7 @@ use warnings;
|
|||||||
# These are set automatically by the build/commit script
|
# These are set automatically by the build/commit script
|
||||||
use constant {
|
use constant {
|
||||||
BUILD_NAME => "PBot",
|
BUILD_NAME => "PBot",
|
||||||
BUILD_REVISION => 661,
|
BUILD_REVISION => 662,
|
||||||
BUILD_DATE => "2014-06-20",
|
BUILD_DATE => "2014-06-20",
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -1118,10 +1118,14 @@ parameter_list:
|
|||||||
} elsif (@list == 1) {
|
} elsif (@list == 1) {
|
||||||
$return .= $list[0];
|
$return .= $list[0];
|
||||||
} else {
|
} else {
|
||||||
|
my $identifier;
|
||||||
if(grep { /function.*returning/ } @list) {
|
if(grep { /function.*returning/ } @list) {
|
||||||
push @list, shift @list;
|
push @list, shift @list;
|
||||||
push @list, shift @list;
|
$identifier = shift @list;
|
||||||
|
} else {
|
||||||
|
$identifier = pop @list;
|
||||||
}
|
}
|
||||||
|
$return .= "$identifier as ";
|
||||||
$return .= join(' ', @list);
|
$return .= join(' ', @list);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user