You can use #parseMethod:onError: to check for syntactical errors. Semantical errors are harder to detect, some of them (e.g. undeclared variables) you can find using AST-Semantics. Lukas On 23 July 2010 00:35, Fernando olivero <oliverof@lu.unisi.ch> wrote:
I have a question about validating a methodNode, suppose we have the following:
parsedNode := Â RBParser parseMethod: 'test ^ self add: anUnbindedVariable'.
Is there a way of checking the health/validity of the parsedNode?
I couldn't find any behavior in RBMethodNode or related classes.
Lukas, do you have an idea is i could run any Lint rule?
My idea is to provide a method editor morph, that prevents from accepting invalid sources, and informs the user any problems detected with the edited code.
Thanks, Fernando
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
-- Lukas Renggli www.lukas-renggli.ch