Skip to content

sebzz2k2/haki_script_js

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

haki-script

haki-script is a interpreter for a custom language called haki-script

Usage

To install dependencies:

bun install

To run: With file name

bun run index.ts <path to file>
  • use file .haki extension

To run: With code

bun run index.ts

Syntax

Variables

  • let variable_name = value ;
  • const variable_name = value ;
  • can use boolens and numbers

Functions

  • fn function_name ( arguments ) { function_body }

Objects

  • { key: value, key: value }

Operators

  • add: +
  • subtract: -
  • multiply: *
  • divide: /

sample code

fn foo(a) {
    let x = 12-a;
    let y = 10;
    let z = x / y *2 ;
    z

}
let foo_Val = foo(12+2);
print(foo_Val);

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published