/* SI 413 Fall 2011
 * Machinery for making built-in functions
 */

#ifndef BUILTIN_HPP
#define BUILTIN_HPP

#include "ast.hpp"

class Builtin :public Stmt {
  private:
    string param;

  protected:
    int numParts() { return 0; }
    AST* getPart(int i) { return NULL; }
  
  public:
    Builtin (const string& p = "x") :param(p) { }

    const string& getParam() { return param; }
};

class Sqr :public Builtin {
  protected:
    const char* getType() { return "sqr:builtin"; }

  public:
    void exec(Frame* f);
};

#endif // BUILTIN_HPP