Skip to content

divshekhar/DevScript

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

78 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DevScript

Programming Language

DevScript Logo by Sanatan Choudhary

Features

  • Comment
  • Literal types: int, bool, string
  • Expression evaluation
  • Variable Declaration and initialization
  • Higher level function
  • If-Else Expression
  • Builtin len, print & println functions
  • REPL
  • Run .ds File

Build

Run make build to build the executable. If Golang is installed on your system, build using go build command.

Hands On with the language

Create a new .ds file and write the following code.

var a = 10;
var b = 5;

var add = func(x, y) {
    return x + y;
}

var sub = func(x, y) {
    return x - y;
}

var operation = func(x, y, fn) {
    return fn(x,y);
}

var result = operation(a, b, add);

func addition(x, y) {
    return x + y;
}

if (result == addition(a, b)) {
    print("The Result is:");
    println(result);
} else {
    print("Wrong Result");
}

Contributions and suggestions

Refer CONTRIBUTING.md file for more information about the contribution and suggestions.

About

Ongoing project to develop a new programming language.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages