Parse Trees and Scaled Decimal syntax

VA Smalltalk is a "100% VisualAge compatible" IDE that includes the original VisualAge technology and the popular VA Assist and WidgetKit add-ons.

Moderators: Eric Clayberg, wembley, tc, Diane Engles, solveig

Parse Trees and Scaled Decimal syntax

Postby g.cotelli » Mon Sep 20, 2010 7:20 am

running some SmallLint rules I found something odd in parse tree building.

When using the "s" syntax for ScaledDecimals (125.1225s4) in some method, the built parse tree takes s4 as a message sent to 125.1225, generating false positive Small Lint rules failures (like message s4 not implemented).

To reproduce create a class: ScaleDecimalParseTreeCase and a method:
Code: Select all

   ^Array with: 522.12s4

and then inspect:
Code: Select all
ScaleDecimalParseTreeCase parseTreeFor: #sample

the generated parse tree has an RBMessageNode (with s4 as message) instead an RBLiteralValueNode with the full scaled decimal literal.

I'm using VA 8.0.2 GA with the Refactoring Browser features loaded.

Posts: 13
Joined: Wed Feb 24, 2010 9:30 am

Re: Parse Trees and Scaled Decimal syntax

Postby wembley » Tue Sep 28, 2010 12:16 pm

We added the 's' syntax for ScaledDecimal some time ago (somewhere in V6.0 - 6.0.3 timeframe), but the RBParser never got updated to account for this new syntax. I will work with the owner of the parser to get it updated.
John O'Keefe [|], Principal Smalltalk Architect, Instantiations Inc.
Posts: 405
Joined: Mon Oct 16, 2006 3:01 am
Location: Durham, NC

Return to VA Smalltalk 7.0, 7.5 & 8.0

Who is online

Users browsing this forum: No registered users and 1 guest