Changes regarding parsing of code with errors in Pharo 12
Parsing of code with errors:
In Pharo 11 ends ends up inRBParser>>#parserError:
and raises a SyntaxErrorNotification
that can be caught. Resuming from that error raises then ReparseAfterSourceEditing
, and that triggers another reparsing.
In Pharo 12 a CodeError
is raised instead from RBNotice>>#signalError
. Parsing does not directly raise an error. Instead the AST is annotated with notices (RBNotice
) and RBProgramNode>>#checkFaulty:
throws a code error if any RBErrorNotice
are detect in any AST node.
The entry point where coder shows parse errors (SyntaxErrorNotification
/CodeError
) and OCUndeclaredVariableWarning
is GtSourceCoder>>#notifyParseError:requesterObject:
RBParser parseMethod: 'ha +1'
RBParser parseExpression: '+1'