mirror of
https://github.com/pragma-/pbot.git
synced 2024-12-23 19:22:40 +01:00
CGrammar: Fix passing 0 as argument to function
This commit is contained in:
parent
5f9fb29e7e
commit
38b6edf656
@ -13,7 +13,7 @@ use warnings;
|
||||
# These are set automatically by the build/commit script
|
||||
use constant {
|
||||
BUILD_NAME => "PBot",
|
||||
BUILD_REVISION => 724,
|
||||
BUILD_REVISION => 725,
|
||||
BUILD_DATE => "2014-07-10",
|
||||
};
|
||||
|
||||
|
@ -266,7 +266,7 @@ iteration_statement:
|
||||
$return .= "Repeatedly ^L";
|
||||
}
|
||||
|
||||
$return .= "$item{statement}.";
|
||||
$return .= "$item{statement}.\n";
|
||||
|
||||
if ($increment) {
|
||||
$return =~ s/End for loop.$//;
|
||||
@ -1015,7 +1015,7 @@ postfix_productions:
|
||||
}
|
||||
|
||||
my $arg_exp_list = join('',@{$item{'argument_expression_list(?)'}});
|
||||
if ($arg_exp_list) {
|
||||
if (length $arg_exp_list) {
|
||||
$return .= " with argument$arg_exp_list";
|
||||
}
|
||||
|
||||
@ -1214,7 +1214,7 @@ argument_expression_list:
|
||||
} elsif (@arg_exp_list == 2 ) {
|
||||
$return = "s ^L$arg_exp_list[0] and ^L$arg_exp_list[1]";
|
||||
} else {
|
||||
if ($arg_exp_list[0]) {
|
||||
if (length $arg_exp_list[0]) {
|
||||
$return = " ^L$arg_exp_list[0]";
|
||||
} else {
|
||||
$return = '';
|
||||
|
@ -75,6 +75,7 @@ foreach my $arg (@ARGV) {
|
||||
$output =~ s/the evaluate the/the/g;
|
||||
$output =~ s/by evaluate the/by the/g;
|
||||
$output =~ s/the a /the /g;
|
||||
$output =~ s/result of the expression the result of the function/result of the function/g;
|
||||
|
||||
foreach my $quote (@quotes) {
|
||||
next unless $quote;
|
||||
|
Loading…
Reference in New Issue
Block a user