pharo
pharo copied to clipboard
Sloppy bestNodeFor: return value and not assignment
testBestNodeForReturnAStatementWhenIntervalInStatementWithoutLeftPart
| ast start body |
body :=
'm
| a |
a := 1111111111111111.
'.
start := 'm
| a |
' size.
ast := (RBParser parseMethod: body) bestNodeFor: (start + 2 to: start + 6).
self assert: ast isAssignment.
self assert: ast sourceCode equals: '1111111111111111'
shows that placing the caret just before the : in a := 1111111111111111. returns the value and not the assignment