Wow… found this http://magaloma.seasidehosting.st/AST-Core

It seems the AST knows the difference between RBBlockNode and assignment… it 
seems to have everything …

Is this AST in use in Pharo right now?
Can i use RBConfigurableFormatter to do this?


Pe 25.01.2013, la 13:40, "Marcus Denker-4 [via Smalltalk]" 
<[email protected]> a scris:

> > 
> > 
> > Question 1: Would "invalid" code compile anyway and i would get the 
> > execution order inspecting the AST, as errors would pop up at "run time"? 
> > 
> Depending on which kind. Everything that is syntactically correct is compiled 
> and then run. This can lead to runtime errors, e.g. when a method 
> is called that does not exist (other languages would catch that due to static 
> typing at compile time). 
> 
> > Question 2: Or… invalid code does not compile and i don't get to the stage 
> > where AST gives me anything useful (when using copy pasted code from 
> > anywhere) so i have to code some kind of smalltalk "text" parser and search 
> > for the patterns myself? 
> > 
> The good news is that the RBParser can compile even syntactically incorrect 
> code. 
> (Camillo added this): 
> 
> RBParser parseFaultyExpression: '1 +' 
> 
> Im 3.0, we will use this for syntax highlighting (instead of the special 
> parser now used). 
> 
> But one fun experiment would be to extend the compiler (and the AST 
> Interpreter) to actually 
> do the right thing: compile code for the correct part and raise an error at 
> runtime for the 
> RBParseErrorNode. :-) 
> 
>         Marcus 
> 
> 
> If you reply to this email, your message will be added to the discussion 
> below:
> http://forum.world.st/How-do-i-list-the-execution-order-of-statements-inside-a-method-tp4665303p4665316.html
> To unsubscribe from How do i list the execution order of statements inside a 
> method?, click here.
> NAML





--
View this message in context: 
http://forum.world.st/How-do-i-list-the-execution-order-of-statements-inside-a-method-tp4665303p4665331.html
Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.

Reply via email to