JavaScript Dependency Generator in PHP
$100-500 USD
Płatność przy odbiorze
We need a class with functions, or functions, written in PHP, that takes in a stringof valid JavaScript and performs some parsing on it, defined below:
? 1) We need a list of all named functions that the JS stringdefines. Please note that there is more than one way to define a function inJS, and you need to allow each syntax. It is also important, and should beclearly marked, which functions are defined in the global space and which aredefined within some other context.
examples:?
function A(someParam) {}
B = function() {}
B.prototype.C = function() {}
A, B are global functions, and C is a method ofB.
2) We need a list of general statements that the file hasthat are not themselves definitions of functions nor are used inside offunctions, but just general statements.
examples:
alert("hi!");
3) For every function, we need a list of what calls it canmake to other functions, in order to know dependencies. These other functionsmay or may not appear within the file - you simply need to parse the [url removed, login to view], it is relevant which functions are called globally and which arecalled as methods of an object. You do NOT, however, have to worry about thetype of the object, only whether or not it was global. Finally, note that thereis more than one way to call a function in JavaScript.
examples:
DoThis(blah, blah);
[url removed, login to view]();
new Something();
someObject.C();
DoThis, DoThat, Something are global calls, butC was called as a method.
Numer ID Projektu: #3570857