⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 builtins.h

📁 Shorthand是一个强大的脚本语言
💻 H
字号:
#ifndef __builtins_h
#define __builtins_h
///////////////////////////////////////////////////////////////////////////////
// $Header: /shorthand/src/builtins.h 3     8/28/02 6:27a Arm $
//-----------------------------------------------------------------------------
// Project: ShortHand interpreter
// Author: Andrei Remenchuk <andrei@remenchuk.com>
//-----------------------------------------------------------------------------
// builtins.h: built-in ShortHand functions
///////////////////////////////////////////////////////////////////////////////

#include "array.h"
#include "function.h"

typedef ShhValue (*shorthand_function_t)(ShhModule* module, const ShhValueList& args);



class ShhBuiltin : public ShhFunction
{
protected:
    /** native function pointer */
    shorthand_function_t m_function;

public:
    ShhBuiltin(const char* name, shorthand_function_t f, int argc = 0);
    ShhValue execute(ShhModule* module, const ShhValueList& args) const;
    void paste_location(string& location);

friend class ShhBuiltinList;
};

class ShhBuiltinList : public array<ShhBuiltin, false>
{
public:
    const ShhBuiltin* find(const char* name);
};


extern ShhBuiltinList g_builtins;

#endif // __builtins_h

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -