Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enhance RBParseTreeRewriter class comment to show #2250

Closed
Ducasse opened this issue Jan 15, 2019 · 2 comments
Closed

Enhance RBParseTreeRewriter class comment to show #2250

Ducasse opened this issue Jan 15, 2019 · 2 comments

Comments

@Ducasse
Copy link
Member

Ducasse commented Jan 15, 2019

we should add an example showing how to install a transformed method.

| rewriter node method |
rewriter := RBParseTreeRewriter new.
rewriter replace: 'self shouldnt: [re compile] raise: Error' with: 'self compileIsOK'.
method := (ReTest>>#testNewSuite3test10).
node := method parseTree.
(rewriter executeTree: node)
ifFalse: [ ^ self ].
method origin
compile: node formattedCode
classified: method protocol

@Ducasse
Copy link
Member Author

Ducasse commented Jan 22, 2019

#2288

@MarcusDenker
Copy link
Member

this was merged

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants