Thanks to visit codestin.com
Credit goes to github.com

Skip to content

laal65/ana

 
 

Repository files navigation

Welcome to Ana

Build Status

Ana is a Python, PHP, and C inspired dynamically typed scripting language that implements object-oriented programing along with imperativeness. Learn more.

Features

  • classes with single layered inheritance
  • dynamically sized arrays
  • built in hash map support
  • variadic functions
  • simple module system
  • built in types
  • C based runtime extension system
  • garbage collection
  • first class functions
import String;

class Logger 
{
    function Logger(buffered)
    {
      self._buffered = buffered;
      self._lines = [];
    }

    function log(fmt, ...args)
    {
      line = String.format(fmt, args);

      if(!_buffered)
      {
        print(line); 
      }
      else 
      {
        self._lines.push(line);
      }
    }
}

logger = Logger(false);

logger.log("{}", "Welcome to Ana Lang v.0.0.1");

To run this example, simply execute ana logger.ana at your shell of choice. Hint: Make sure String.ana is located in the directory of logger.ana. It's located in the lib directory.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C 90.0%
  • Yacc 3.4%
  • Python 2.3%
  • Vim Script 1.6%
  • Lex 1.6%
  • Makefile 0.9%
  • Other 0.2%