Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/kamkow1/spring-pl

spring is a small OO programming language made for fun
https://github.com/kamkow1/spring-pl

csharp dotnet dotnet-core dotnetcore interpreter programming-language scripting-language

Last synced: 16 days ago
JSON representation

spring is a small OO programming language made for fun

Awesome Lists containing this project

README

        

# Spring Programming Language

Spring is an interpreted object-oriented programming language
with it's syntax resambling Python, C and PHP.

## Features

- structs
- encapsulation
- functions
- variables
- loops
- if blocks
- elif and else blocks
- each (foreach) loops
- arrays

## Usage/Examples

```text
[]
[/]

struct Person {
prv prop mood;

pub def setMood(self, v) {
$v -> $self.mood;
}

pub def sayMood(self) {
if $self.mood == "happy" {
println "yay im happy!";
}
elif $self.mood == "sad" {
println "im sad ;(";
}
else {
println "unknown mood...";
}
}
}

-- use commandline arguments
def main(args) {
declare new Person -> $p;

$p.setMood $p, string $args[0];

$p.sayMood $p;
}
```

## Documentation
coming soon

## building from source

ignore all the warnings. they are caused by antlr4's c# target.
```bash
git clone https://github.com/kamkow1/spring-pl.git
cd spring-pl
cd src/spli
./scripts/build.sh
```
## download
all binaries are located in the publish directory at the root of this repo.
the binaries are self-contained, therefore don't require dotnet to run (dotnet is included in the binary)

## to add
a list o features to add to the language
- json serialization / deserialization
- xml parsing
- lambda expressions
- enums