Browse Source

dereferenceHasBase() as undefined key are fine if base variable exists, doFunctionCall => jsFunctionCall to support constructs

master
Odilitime 2 years ago
parent
commit
06ed9b8947
1 changed files with 3 additions and 1 deletions
  1. 3
    1
      src/parsers/scripting/javascript/JSParser.h

+ 3
- 1
src/parsers/scripting/javascript/JSParser.h View File

@@ -100,6 +100,7 @@ js_internal_storage *jsLocateKey(const js_function *scope, const std::string key
js_internal_storage **getObjectKeyPointer(const std::string input, const js_function *scope);
// right side deference
js_internal_storage *dereferenceObject(const std::string input, const js_function *scope);
bool dereferenceHasBase(const std::string input, const js_function *scope);
js_function *makeFunctionFromString(const std::string body, const std::string prototype, js_function *parent);
// FIXME: should be a member function
void jsDisplayScope(const js_function *scope, size_t level);
@@ -118,7 +119,8 @@ size_t locateRegexEnd(const std::string source, const size_t start);
size_t getNextExpression(const std::string source, const size_t start);
size_t parseFunctionBody(std::string source, size_t start);

js_internal_storage *doFunctionCall(js_function *func, std::string params, js_function &scope);
//js_internal_storage *doFunctionCall(js_function *func, std::string params, js_function &scope);
js_internal_storage *jsFunctionCall(std::string funcName, js_function *func, std::string params, js_function &scope);
js_internal_storage *doExpression(js_function &rootScope, std::string token);
bool doAssignment(js_function &rootScope, std::string token);


Loading…
Cancel
Save