Skip to content

YigitGunduc/cycle

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Cycle

A simple programming/scripting language build with javascript

Run Locally

Clone the project

  git clone https://github.com/YigitGunduc/cycle.git

Go to the project directory

  cd cycle

Run your script

  node src/index.js filename.cyc

or

./cycle filename.cyc

Usage/Examples

a <- 1 to 10 : p(a) // for loops

p(a) // printing a variable

a = 123 // assingment 

a == 123 ? a = 3 : p(a) // if statments

p(a) // printing a variable

assingment

<variable> <=> <digit>

//example
a = 123

printing

<p(> <variable> <)>

//example
p(a)

If statments

<varibale> <==> <digit> <?> <true case> <:> <false case>

// example
a == 123 ? a = 3 : p(a) 

for loops

<varibale> < <- > <digit> <to> <digit> <:> <do every iteration>

// example
a <- 1 to 10 : p(a) 

Roadmap

  • Support for variable to varibale comparasion

  • Support more keywords

  • Fix end of file error

Contributing

Any contributions you make are greatly appreciated.

License

MIT