Thushar G R
Thushar G R

Reputation: 1037

Pharo code formating issues

In Pharo 2.0 image, when i try to format my code on nautilus browser i get the code scrambled in an unexpected way.

For example

testStrings
| a b |
a := 'AAAAA'.
b := 'BBBBB'.
^a,b

If this method is typed and after saving, try to format it. What i got was this, note the duplicated string-

testStrings
    | a b |
    b := 'BBBBB'.
    b := 'BBBBB'.
    ^ a , b.

Has anyone come across this before? Any way out of this?

Upvotes: 2

Views: 175

Answers (2)

MarcusDenker
MarcusDenker

Reputation: 61

I tried to reproduce this problem in the latest Pharo 2.0 and I could not... it formats perfectly fine.

Do you load any other packages in addition? Maybe something that breaks the AST formatter?

Upvotes: 3

Thushar G R
Thushar G R

Reputation: 1037

I had the AST-Core package reloaded from the repo and the problem was solved. it seems something i loaded in the image caused some of the AST classes(like RBLiteralValueNode) to move to Unclassified package, and also some instance vars were undeclared. This cause the formatting statemets preparation to fail. however on loading all latest it solved the issue.

Upvotes: 4

Related Questions