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

module keyword conflict with node.js #13

Closed
mozbugbox opened this issue May 3, 2014 · 2 comments
Closed

module keyword conflict with node.js #13

mozbugbox opened this issue May 3, 2014 · 2 comments

Comments

@mozbugbox
Copy link

node has this module Object for each module file. RapydScript also use module as keyword. Can we somehow temporarily override rapydscript keyword to javascript keyword?

With module in node.js, we can simulate __main__ as

if require.main is module:
    main()

See http://nodejs.org/api/modules.html#modules_accessing_the_main_module

@atsepkov
Copy link
Owner

atsepkov commented May 3, 2014

You can use JS('module') to tell RapydScript that this text has special meaning in JS an is not to be touched. See an example I put together here: http://rapydscript.pyjeon.com?q=juVDXX

@mozbugbox
Copy link
Author

Thanks. I forget I can use JS() to include raw js code.

@atsepkov atsepkov closed this as completed May 3, 2014
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

No branches or pull requests

2 participants