Some variables in includes/locale.inc's _locale_import_parse_arithmetic() were added in 2004 that are hard to read because they're not descriptive. They should probably be re-named to something that actually describes what they're used for.

Examples:

$elstk
$ctok
$opstk
$prec

Comments

lyaunzbe’s picture

Assigned: Unassigned » lyaunzbe

I'd like a try at this, though I'll probably need some help wading through and understanding the actual function. Just from taking a quick look, it appears as though $ctok represents the current token being operated on within the foreach loop that is iterating through an array of tokens.

marc delay’s picture

Assigned: lyaunzbe » marc delay
Status: Active » Needs review
StatusFileSize
new11.11 KB

hit this with the big variable name stick.
$elstk => $element_stack
$ctok => $current_token
$opstk => $operator_stack
$prec => $precedence
$rasc => $right_associativity
$prevsize => $previous_size

okay, maybe the last one wasn't needed, but I was on a roll

Status: Needs review » Needs work

The last submitted patch, locale_good_variables.patch, failed testing.

marc delay’s picture

Status: Needs work » Needs review
StatusFileSize
new5.12 KB

whoops, i accidentally rolled the patch against an already modified locale.inc file.
hes the right roll up.

aspilicious’s picture

applied without conflicts...

RTBC?

iwayman’s picture

Status: Needs review » Reviewed & tested by the community
Issue tags: +D7csmtl

Applied without conflict. Code reviewed; all variables from the _locale_import_parse_arithmetic() function are now descriptive enough.

dries’s picture

Status: Reviewed & tested by the community » Fixed

Nice clean-up. Committed to CVS HEAD. Thanks.

Status: Fixed » Closed (fixed)
Issue tags: -Novice, -D7csmtl

Automatically closed -- issue fixed for 2 weeks with no activity.