3
0
mirror of https://github.com/pragma-/pbot.git synced 2024-11-19 10:29:30 +01:00

CGrammar: Remove some redundant returns

This commit is contained in:
Pragmatic Software 2014-06-11 08:54:12 +00:00
parent 992dae043f
commit 026db04e4a
2 changed files with 2 additions and 7 deletions

View File

@ -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 => 630, BUILD_REVISION => 631,
BUILD_DATE => "2014-06-11", BUILD_DATE => "2014-06-11",
}; };

View File

@ -979,9 +979,6 @@ primary_expression:
| constant | constant
| string | string
| identifier | identifier
{
$return = "$item{identifier}";
}
declarator: declarator:
direct_declarator direct_declarator
@ -1108,7 +1105,6 @@ DAD: # macro for direct_abstract_declarator
identifier: identifier:
...!reserved identifier_word ...!reserved identifier_word
{ $return = $item{identifier_word}; }
pointer: pointer:
'*' type_qualifier_list(s) pointer(?) '*' type_qualifier_list(s) pointer(?)
@ -1303,9 +1299,7 @@ enumerator:
comment: comment:
comment_c comment_c
{ $return = $item{comment_c}; }
| comment_cxx | comment_cxx
{ $return = $item{comment_cxx}; }
comment_c: comment_c:
m{/\*[^*]*\*+([^/*][^*]*\*+)*/}s m{/\*[^*]*\*+([^/*][^*]*\*+)*/}s
@ -1323,6 +1317,7 @@ comment_cxx:
$return = $item[1]; $return = $item[1];
$return =~ s|^//\s*||; $return =~ s|^//\s*||;
$return =~ s/\n*$//; $return =~ s/\n*$//;
$return =~ s/"/\\"/g;
$return = "\nQuick comment: \"$return\".\n"; $return = "\nQuick comment: \"$return\".\n";
} }