Battledash-2 / mlang

M Lang - The Arithmetic Language: M is an open-source language that is meant to help people learn about Tokenizers, Parsers, and interpreters. It supports variables, logging, built-in functions and expressions.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

MLang (v1.8.7): The Mathematics Language

What is M

M is an open-source language that is meant to help people learn about Tokenizers, Parsers, and interpreters. It supports variables, logging, and expressions.

Project Status

Version: v1.8.7

  • If a { block } is expected but a { isn't seen, it will allow a single expression to pass (which also means there is support for else if)

Package manager

  • There is a package manager under development by justamirror that you can see here.
  • There isn't any official package manager as of now, if any others pop up they will be mentioned here.

Known Bugs

  • PENDING: print with multiple arguments prints an array instead of formatting all args
  • PENDING: Can't return a variable
  • UPDATED: printf and format functions now also include the position of an error (in the case one occurs)
  • FIXED: Error positioning was sometimes negative because of strings

To-Do (in order from Most Important to Least Important)

  • Add 'import ... as ...'
  • Objects [NOT EXPECTED]

Scrapped Ideas (maybe in the future?)

  • Nothing scrapped...

Done

  • Add options to modify a value in an array [HIGH PRIORITY]
  • Arrays
  • Scopes [HIGH PRIORITY]
  • Strings module
  • HTTP Module (Possible, but unexpected)
  • While loops
  • Operations like varName += 5
  • Better import/export
  • Multiple arguments in functions (util.arg, util.arg1, util.arg2 || $pid, $pid1, $pid2)
  • Javascript API (Priority: extremely low / not expected soon)
  • Pseudo-pointers / Reference to $pid (passed in variable to a function) and $last (last variable set) (Priority: unexpected)
  • Conditional statements (Priority: HIGH)
  • Multi-line comments (Priority: extremely low)
  • Export keyword (Priority: unknown)
  • Import files (Priority: unknown)
  • Minimal string support (Priority: unknown)
  • Functions (Priority: Medium)
  • Unit Conversion (Priority: unknown)
  • Expressions (Priority: HIGH)
  • Variables (Priority: Medium)
  • Logging (Priority: Low)
  • Built-in Functions (Priority: unknown)

Want a tutorial on how you can make your own language?

Well, are you in luck! I've recently created a tutorial for making a simple number interpreter from scratch.

Check it out!

About

M Lang - The Arithmetic Language: M is an open-source language that is meant to help people learn about Tokenizers, Parsers, and interpreters. It supports variables, logging, built-in functions and expressions.

License:MIT License


Languages

Language:JavaScript 88.5%Language:Objective-C 6.2%Language:Mercury 2.5%Language:MATLAB 1.2%Language:HTML 1.2%Language:M 0.2%Language:Limbo 0.2%