learning - regular expressions

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

learning - regular expressions

pbr
Greetings!

I'm an old-time Smalltalker (VW, mostly... some VisualAge) - and also into JS.

So... Amber is pretty compelling.

I decided to dive in and look at how things were integrated to JS.  I figured regex's would be a great place for that.

Then I ran straight into a brick wall.

compile: aString
<return self.compile(aString)>

What am I missing?  that IS self.compile.

Thanks!
-PBR
Reply | Threaded
Open this post in threaded view
|

Re: learning - regular expressions

Herby Vojčík


Paul Reiber wrote:

> Greetings!
>
> I'm an old-time Smalltalker (VW, mostly... some VisualAge) - and also
> into JS.
>
> So... Amber is pretty compelling.
>
> I decided to dive in and look at how things were integrated to JS. I
> figured regex's would be a great place for that.
>
> Then I ran straight into a brick wall.
>
> compile: aString
> <return self.compile(aString)>

ST #compile does not translate to JS compile (it's in fact _compile_,
but the actual value does not matter).

So this is like "smalltalk compile: should call JS .compile()", and JS
compile is itself defined elsewhere, like in boot.js or somewhere else.

Herby

> What am I missing? that IS self.compile.
>
> Thanks!
> -PBR

P.S.: Printit "Compiler new compile: 'foo ^42' forClass: Object" in
workspace and experiment to see what compiler produces.
pbr
Reply | Threaded
Open this post in threaded view
|

Re: learning - regular expressions

pbr
Ah, yes.... I dove right into exploring the object base when I needed
to RTFM first.
Here are the two characters I overlooked:  < and >

As in:
< ...javascript code... >

> P.S.: Printit "Compiler new compile: 'foo ^42' forClass: Object" in
> workspace and experiment to see what compiler produces.

Rockin!  Great advice.  THANKS!
-pbr