Comments (13)
Hi @raasumy, do you have regular expression literals in your project? Regex will definitely cause the parser to choke in such a fashion. Also note that the namespace
keyword is not supported in this project which is another common issue people have had
from as3js.
yep, I have some regular expressions used an I just masked them with quote marks so errors on them are not being raised. Then there was one file with namespace declaration on it, removed that file from project. I've examined all the issues opened and closed, seems like nobody else had anything similar.
I also tried using as3js with separate folder that is only a part of my project and it seems to work fine until the last file is parsed and I get "cannot read property 'className' of undefined". As far as I understand it's because there is no document class file in chosen folder and partial compilation fails.
Please share if you have any thoughts how to diagnose this issue properly.
from as3js.
It sounds like you did your research! It even appears you tried the verbose
flag, correct? The next step would be to narrow down which file is causing the crash. Here's something silly you could try- copy your source files one by one into the demo page and see what errors pop up:
Also be sure to remove all the imports of your classes in this demo to suppress errors, the parser should be able to handle it since without imports it's mostly only looking for the syntax to be correct
from as3js.
Verbose was also examined, correct.
The thing is that error raises during parsing Main.as, which is aparently the last file to be processed. If I try to convert this file through demo page - everything is ok.
from as3js.
Are you ok with sharing the code from your Main.as? This definitely sounds like a bug I haven't encountered yet, I might be able to get to the bottom of it more quickly
from as3js.
Unfortunately I can't disclose source contents. Currently came up to converting all the files one by one. Boring, silly but effective) I'll try to reproduce the issue on other sources I have that can be disclosed.
from as3js.
Alright, that's good to hear the workaround is effective. If you are able to reproduce the issue on purpose I can definitely push a quick fix. Though at the moment I'm not aware of any particular logic that would cause a stack overflow. It definitely appears to be revolving strings in some fashion
from as3js.
I have a similar issue. I was testing this on D.eval (http://o-minds.com/deval/) and was hit with the following error:
/usr/local/lib/node_modules/as3js/runtime.js:1058
if (c.match(characters)) {
^
RangeError: Maximum call stack size exceeded
at RegExp.exec (native)
at RegExp.Symbol.match
at String.match (native)
at Function.AS3Parser.nextWord (/usr/local/lib/node_modules/as3js/runtime.js:1058:15)
at Function.AS3Parser.parseFunc (/usr/local/lib/node_modules/as3js/runtime.js:1338:31)
at Function.AS3Parser.parseFunc (/usr/local/lib/node_modules/as3js/runtime.js:1406:44)
at Function.AS3Parser.parseFunc (/usr/local/lib/node_modules/as3js/runtime.js:1406:44)
at Function.AS3Parser.parseFunc (/usr/local/lib/node_modules/as3js/runtime.js:1406:44)
at Function.AS3Parser.parseFunc (/usr/local/lib/node_modules/as3js/runtime.js:1406:44)
at Function.AS3Parser.parseFunc (/usr/local/lib/node_modules/as3js/runtime.js:1406:44)
from as3js.
@letitfly look at any Java Script reference and format you regexp accordingly. In my case it was enough to put it in quotes.
from as3js.
Anyway, the offending line seems to be a simple statement:
trueNext = falseNext = null;
Once that was changed to two separate statements, the program was able to go through.
from as3js.
I ran into another problem and I hope it's fine I posted here. The code I tried to convert to js uses flash system libraries. I passed the --ignore-flash and as3js completes, but obviously the resulting code is not runnable. So what are left for me to do?
One of the import is "import flash.utils.describeType;", this is inflection and I suppose it can be implemented in js. Is that the recommended path forward?
from as3js.
@letitfly Splitting a problematic line into shorter expressions will almost always to the trick, but I do wonder- were trueNext
and falseNext
getter/setters? I added special behavior for evaluating those types of statements to ensure better browser compatibility, so the bug could have been with the parser getting confused on the assignment.
As for your other problem, your assumption is correct that flash packages needs to be re-implemented in JavaScript (or if used with this library, could be re-implemented in AS3 alternatively)
from as3js.
Closing since this project is obsolete
from as3js.
Related Issues (17)
- error HOT 5
- as3js crashes when attempting to import undefined packages HOT 5
- Do class member references need to be prefixed by their class name? HOT 4
- Automatically replace "new Dictionary()" with "new Object()"? HOT 3
- Some variable typing for const variables was not dropped HOT 2
- It seems like class member initializations sometimes aren't in the right block of code. HOT 3
- Function doesn't transpile corecly HOT 1
- Please reopen this project! HOT 4
- i got a type error in the AS3JS Live demo HOT 1
- No such file or directory" HOT 8
- Investigate Implementing AS3 AST Parser HOT 9
- Can it go the other way? HOT 3
- Empty package fails HOT 4
- Convert unsupported compound assignment HOT 1
- -v command line arguments conflict HOT 2
- for(var i:int=0,len:int=arr.lengthi<len;i++) HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from as3js.