/* * This file is part of Espruino, a JavaScript interpreter for Microcontrollers * * Copyright (C) 2013 Gordon Williams * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. * * ---------------------------------------------------------------------------- * Header for auto-generated Wrapper functions * ---------------------------------------------------------------------------- */ #include "jsutils.h" #include "jsparse.h" #define JSW_HANDLEFUNCTIONCALL_UNHANDLED ((JsVar*)-1) /** If 'name' is something that belongs to an internal function, execute it. */ JsVar *jswHandleFunctionCall(JsVar *parent, JsVar *parentName, const char *name); /// Given the name of an Object, see if we should set it up as a builtin or not bool jswIsBuiltInObject(const char *name); /// If we get this in 'require', should we make an object with this name? bool jswIsBuiltInLibrary(const char *name); /** Given a variable, return the basic object name of it */ const char *jswGetBasicObjectName(JsVar *var); /** Given the name of a Basic Object, eg, Uint8Array, String, etc. Return the prototype object's name - or 0. * For instance jswGetBasicObjectPrototypeName("Object")==0, jswGetBasicObjectPrototypeName("Integer")=="Object", * jswGetBasicObjectPrototypeName("Uint8Array")=="ArrayBufferView" * */ const char *jswGetBasicObjectPrototypeName(const char *name);