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

Arbitrary compiler options #40

Merged
merged 3 commits into from Feb 28, 2018

Conversation

B14m3m3
Copy link
Contributor

@B14m3m3 B14m3m3 commented Feb 26, 2018

Added a compiler options object that will be passed to the compiler, to enhance the thing in issue #39.

This should allow the user to specific whatever options there are in the cobc as required. I've added the free flag in the Hello world example to show the intended change.

As a small side change i also made was adding a callback to the Fs.unlink as it was giving deprecation errors :). Currently the callback does nothing.

Copy link
Owner

@IonicaBizau IonicaBizau left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a very small change in the example. Overall, it's good! :)

@@ -14,7 +14,7 @@ Cobol(function () {/*
DISPLAY "Hello world".
PROGRAM-DONE.
STOP RUN.
*/}, function (err, data) {
*/}, {compileargs:{free:true}}, function (err, data) {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you please write this on multiple lines, so it won't be so condensed?

if (options.free) {
args.free = options.free;
}
Object.assign(args, options.compileargs);
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good!

@B14m3m3
Copy link
Contributor Author

B14m3m3 commented Feb 26, 2018

Made the change to make the statement a bit more spacious :)

@B14m3m3
Copy link
Contributor Author

B14m3m3 commented Feb 28, 2018

@IonicaBizau I'm kinda new to adding things to open-source :) please notify me if another pull request or something has to be done. I should have fixed the example so that it's less condensed

@IonicaBizau
Copy link
Owner

@B14m3m3 Sorry, I just missed your last commit. 🙈 Do ping me in such cases. Merging right now. 🚢

@IonicaBizau IonicaBizau mentioned this pull request Feb 28, 2018
@IonicaBizau IonicaBizau merged commit 9c61a2f into IonicaBizau:master Feb 28, 2018
@IonicaBizau IonicaBizau mentioned this pull request Feb 28, 2018
@B14m3m3 B14m3m3 deleted the arbitrary-compiler-options branch February 28, 2018 16:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants