Giter Club home page Giter Club logo

visual-debug's Introduction

Foxely

Foxely is a powerful, dynamically typed written in C++ without any external dependencies (except for stdlib). It is a class-based scripting language inspired a little bit by JS.

Features

  • singlepass compiler
  • repl
  • dynamic typing
  • classes and inheritance
  • higher order functions and classes
  • lexical scoping
  • nested classes
  • closures
  • garbage collection
  • operator overriding

What Foxely code looks like

Vector :: class {
	// constructor
	init (a, b, c) {
	    // instance variables
		this.x = a;
        this.y = b;
        this.z = c;
	}

	// instance method (built-in operator overriding)
	operator + (v) {
        return Vector(this.x + v.x, this.y + v.y, this.z + v.z);
	}

	string() {
		return "[" + str(this.x) + ", " + str(this.y) + ", " + str(this.z) + "]";
	}
}

// initialize a new vector object
v1 := Vector(1, 2, 3);

// initialize a new vector object
v2 := Vector(4, 5, 6);

// call + function in the vector object
v3 := v1 + v2;

// returns string "[1,2,3] + [4,5,6] = [5,7,9]"
print "% + % = %\n", v1.string(), v2.string(), v3.string();

Installation

To compile the library, type make in the root folder. To compile the interpreter, go to examples folder and type make.

API Reference

No available right now.

How to use?

To use the foxely interpreter:

  • make sure that your compile the code here
  • to run the interpreter, type this code ./foxely <file>.fox

visual-debug's People

Contributors

seblague avatar stektpotet avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.