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

Adding class OCCompilerDynamicASTPlugin (and its test class), allowi… #1920

Merged
merged 1 commit into from Oct 31, 2018

Conversation

Projects
None yet
2 participants
@dupriezt
Contributor

dupriezt commented Oct 16, 2018

…ng the dynamic creation of compiler plugins

Usage example:

Object compiler
	addPlugin: 
		(OCCompilerDynamicASTPlugin 
			newFromTransformBlock: [ :ast | (RBParseTreeRewriter replaceLiteral: 42 with: 'meaning of life') executeTree: ast. ast. ]
			andPriority: 0
		);
	evaluate: '42'.

The above yields 'meaning of life'

@MarcusDenker

ok!

@MarcusDenker MarcusDenker merged commit 7c92f54 into pharo-project:development Oct 31, 2018

1 check failed

continuous-integration/jenkins/pr-merge This commit has test failures
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment