Skip to content

ayoubbuoya/MyProgramingLang

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

My Personal Programing Lang

It is a part of my programming lang interepter.

This One supports numbers only .It do basic math operation, Supports Variables, comparisons

I build THis One To Unterstand More How Interepters Works and learning related stuffs such as Parser, Tokenizer, ...

Instrunctions To Try :
  - var a = 5
  - 20 == 20, 5 <= 2, not 1 , (5 == 5) and (8 == 20), (5 == 5) or (8 == 20), ...
  - and of course the basic math operation like : 5 ^ 2, 11 / (var a = 5), ...
  - If Condition :
    lang > var age = 20
    20
    lang > var price = if age >= 20 then 10 elif age < 20 and age > 10 then 5 else 2
    10
  - For and While Loop :
    lang >> for i = 0 to 20 do var r = i
    lang >> r
    19
    lang >> while r < 50 do var r = r + 1
    lang >> r
    50
  - Functions :
    lang >> func add (a, b) {a + b}
    function add
    lang >> add(5, 6)
    11
  - Strings :
    lang >> func greet (name) {"hello, " + name }
    function greet
    lang >> greet("Ayoub")
    "hello, Ayoub"
  - Lists :
    lang >> append([ 1, 2, 3 ] , 5)
    [1, 2, 3, 5]
    lang >> extend([ 1, 2, 3] , [ 5, 4, 6 ])
    [1, 2, 3, 5, 4, 6]
    lang >> pop([1, 2, 3] , 1)
    [1, 3]
  -Some Built-In Functions : is_number(num), a9ra(), a9ra_3dad(), is_function(func), is_string(string), clear(), affichi(msg), ...

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages