Skip to content
/ dojo Public

Dojo is a microlanguage based off of Python.It has many features like function declaration and variable declaration

License

MIT, MIT licenses found

Licenses found

MIT
LICENSE
MIT
LICENSE.txt
Notifications You must be signed in to change notification settings

japrozs/dojo

Dojo

Dojo is a programming language that is loosely based off of the Python which uses the Python compiler and also uses it own Lexer, Parser, Compiler and Token Generator Some features of Dojo are as given below:

  • Function declaration
  • Variable Declaration
  • Basic Arithmetic
  • Executing Files

Install

You can install dojo from the pip python package manager coming soon!!

Curl

You can install dojo from cURL through the following command:

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Japroz-Saini/dojo/master/install.sh)"

Grammar

Basic Grammar of the DOJO Programming Language:

  • All keywords are in Capital

  • FUN = Used to declare a function

  • FOR = used to start a for loop

  • PRINT = return something to the screen

  • RETURN = return something

  • VAR = declare a variable

  • IF = if statement

  • ELIF = elif statement

  • ELSE = else statement

  • # = Declare a comment

  • A Function declaration

FUN greet(int, string)
  FOR i = 0 TO int THEN
    PRINT(string)
  END
END

greet(10, "Hello from Dojo")
tokens = []
APPEND(tokens, "first_element")

# tokens/0 = "first_element"
# instead of tokens[i] you have to use tokens/i to access the i'th element
PRINT(tokens/0)

Single line:

  • Functions
FUN greet(string) -> PRINT(string)
  • If else statements
IF a = True THEN
  PRINT("TRUE")
ELIF a = False THEN
  PRINT("FALSE")
ELSE THEN
  • While statements
WHILE True THEN
  PRINT("HELLO")
END
  • Return statements
FUN greet() THEN
  PRINT("HELLO")
  RETURN "Hello"
END

About

Dojo is a microlanguage based off of Python.It has many features like function declaration and variable declaration

Topics

Resources

License

MIT, MIT licenses found

Licenses found

MIT
LICENSE
MIT
LICENSE.txt

Code of conduct

Stars

Watchers

Forks

Packages

No packages published

Languages