Doc about Coral?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Doc about Coral?

Nicolas Petton
Hi,

I was wondering if there is some documentation about Coral?
I would like to play a bit with it :)

Cheers,

Nico

_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project

signature.asc (204 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Doc about Coral?

Stéphane Ducasse
well this is in a bad taste
but you can by loading

Gofer new
        squeaksource: 'Coral';
        load

CoralLoader load

I did not try in 1.1
let me know if you succeed


Now I'm too busy to push it but I should.... argh.

Syntax is like that:

[ Point < #ColoredPoint
        iv: 'color';
        iv: 'z'.
]

or

[Point < #ColoredPoint
        package: #Box.
]


or

[Point < #ColoredPoint
        iv: 'color z'.
]

or

[Point < #ColoredPoint
        shared: 'DefaultColor'.]


then

[Console print: ''''Coral is working'''', String lf.
Console print: ''''Yahoo!'''']


[
        Object <: #SaBox
                iv: 'bob'
                package: 'SandBox'
]

SaBox>>convertToFiles: aClass inDirectory: rootDir
[
        "a dummy example that convert a class in a file hierarchy"
        | classDir categoryNames |
        classDir := (rootDir / aClass asString) mkdir.
        categoryNames := aClass organization categories collect: [ :aCategory | aCategory asString ].
        categoryNames do: [ :aCategoryName | | protocolDir |
                protocolDir := (classDir / aCategoryName) mkdir.
                (aClass methodsInCategory: aCategoryName) do: [ :aSelector |
                        (protocolDir / (aSelector asFileName replaceAll: $: with: $_)) asFile contents: (aClass sourceCodeAt: aSelector)
                ]
        ].
        ^classDir
]


[
        SaBox new convertToFiles: Object inDirectory: Directory home.
        Console print: ''''The directory '''', Directory home path, ''''/Object has been created''''
]

now the parser works and I was in the middle of moving to filessytem and got stuck in pharo.


Stef

On Apr 21, 2010, at 6:44 PM, Nicolas Petton wrote:

> Hi,
>
> I was wondering if there is some documentation about Coral?
> I would like to play a bit with it :)
>
> Cheers,
>
> Nico
> _______________________________________________
> Pharo-project mailing list
> [hidden email]
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project


_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project