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

Added wrapSource and includeRuntime options #13

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Added wrapSource and includeRuntime options #13

wants to merge 3 commits into from

Conversation

max99x
Copy link

@max99x max99x commented Sep 7, 2011

This treats issue #8. It separates the 3 different effects of raw mode into separate options:

  • raw: Don't rely on the runtime for keyword arg treatment (can be deprecated).
  • wrapSource: Wrap the produced source with a closure.
  • includeRuntime: Import the Move runtime functions into the scope of the compiled code.

This covers all my REPL needs, and does not change the default behaviour at all.

@@ -33,7 +33,9 @@ exports.defaultCompilationOptions = {
outputFormatting: {indent_level: 2, beautify: true},
detailedOutput: false, // if true, return {ast: <ast>, code: <code>}
strict: true, // adds '"use strict";' to the head of generated js code
raw: false // Do not wrap source and do not enable runtime
raw: false, // Disable keyword args that require the Move runtime.
Copy link
Owner

Choose a reason for hiding this comment

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

Could you change this to say "Do not depend on or include the Move runtime library" instead?

Copy link
Author

Choose a reason for hiding this comment

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

After the split, raw does not affect whether the runtime is included - that is controlled only by includeRuntime, so I'd go for just "Do not depend on the Move runtime library".

Copy link
Author

Choose a reason for hiding this comment

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

Done.

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.

2 participants