>> Yes but what is so different in VA Smalltalk code?
Well, so far I saw that:
- methods can be private or public (eventhough I think at the end they all have a public scope)
- there are 4 different ways to define classes: e.g.:
String variableByteSubclass: #MyString
classVariableNames: ''
poolDictionaries: ''
(and instanceVariableNames: is missing)
or:
AClass variableSubclass: #AnotherClass
instanceVariableNames: ''
classVariableNames: ''
poolDictionaries: ''
- another think I never saw and was not part of the parse for methods was the pool dictionary access (but this should be the same in pharo I think): Class::AnotherClass!!variable
for this I had to subclass the method parser
- another think I never saw but it might be the static array stuff you mentioned is:
mapAspect: aString
| map |
map := ##(Dictionary new
at: 'Numberblabla' put: blablabla;
at: 'BLABLABLA' put: MyConstants::ContantClass;
yourself ).
^map at: aString
To parse this I added a unary operator ## followed by an expression.
- There is class extension not package extension
- There are no packages or categories only applications(which are like packages): an application contains classes, can depend from other applications and can be use in class extension (so you say to a class that it is extended by a certain application). From the the point of view of the class you see the application that extend the class and from an application point of view you see the extended classes.
So far this what was new from VA.
When you file out an application (or a set of them) you get a file.app. The syntax of this file is very similar to the st one but of course you need to consider most od the peculiaritis I wrote before (e.g. variableSubclass: etc.).
The parser for the app file btw is done (pretty much). I extended some elements of RB like RBMethod and RBClass and I had to add other AST node for elements that are not present normaly in st file like for example class context switch line: (!MyClass class publicMethods !) after which there are all class side public methods of MyClass and stuff like that.
Cheers,
Fabrizio