On 23 July 2010 11:58, Fernando olivero <oliverof@lu.unisi.ch> wrote:
Thanks for the pointers Lukas,
Works now!
canSuccesfullyParse: aSource in: aClass     [ parsedNode := RBParser parseMethod: aSource onError: [:descrip :position| evaluation := false. errorDescription := descrip. errorPosition := position ] ] on: Error do:[:err|  ].     parsedNode annotateInClass: aClass.     hasUndeclared := parsedNode allChildren select:[:each| each isVariable and:[ each variableBinding isUndeclaredBinding  ]] .     hasUndeclared ifTrue:[ self .... ].
Yep, something like that. You shouldn't need the Error handler, otherwise that would be a bug in the RBParser. Also you might want to check for shadowed variables (#isShadowed), because they cause the compiler to complain. Lukas -- Lukas Renggli www.lukas-renggli.ch