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
Various issues discovered while compiling Rawrcat #117
Comments
Hi @wbrown , thank you for your interest in NectarJS, I will try to compile Rawrcat to check the bugs and correct them Right now there is no debug mode, but it's on the roadmap |
I've just corrected the above in my source code, as it's actually more correct code to use |
the file you want to compile is rawrcat.js ? |
@adrien-thierry Yes, sir. Though now that I think about it -- how does it handle |
Ok, i will check it For require, code is encapsuled into a function call then integrated in the code |
@adrien-thierry Any updates? Any way I can help? :) |
Hi, yes sorry, a lot of things ti do haha NectarJS doesn't support dynamic require yet, can you modify this ? I will add the missing visitors and missing method |
I corrected the |
So what do you mean by this? Just static require statements for the modules in question? Rather than wrapping i.e. rather than: https://github.com/ephsec/RawrCat/blob/master/rawrcat.js#L17-L36 ... and dynamically loading the modules in at runtime, like so: https://github.com/ephsec/RawrCat/blob/master/index.html#L43 ... we do:
... ? |
Yes, exactly, atm, require in NectarJS is a macro that manage code including wrapped in a module. When NectarJS will be self compiled, we will be able to self embed the compiler and generate code from module on the fly, but for now, the only solution is to use static require |
@adrien-thierry Is there a test or variable I can check to detect that that the code is being compiled by NectarJS, or running as a NectarJS-produced executable? I've managed to avoid a build system thus far by checking the runtime environment, and I'd like to continue to do this if possible. :) |
Yes, you can check the
The |
@adrien-thierry I've added the check for the existence of |
Hi @wbrown , I corrected some problems, i will continue |
Awesome. Which problems, out of curiosity? |
Hi @wbrown , we implemented our own parser, we will release a big update soon |
I saw this project, and decided to give it a shot on compiling my JavaScript implementation of RawrCat.
https://github.com/ephsec/rawrcat
Tested versions:
v0.7.99
master
off github.Invoking
nectarjs
onrawrcat.js
uncovered several issues:delete item[k]
throws a parse error inbabel
for()
loops require explicitvar
declaration inside thefor()
if the variable isn't defined beforehand. (This is something I will fix in my source code, for linting purposes)My use of
null
comparison isn't yet supported:Is there a debug mode that will tell me exactly where in the source it's having issues?
--verbose
does not appear to do much.This project interests me, and I'd like to help get it to where it can compile RawrCat. I'm a language, parser, and compiler nerd myself.
The text was updated successfully, but these errors were encountered: