Skip to content

jcppdev/slug-java

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

158 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Build Status codecov

slug-java

Java implementation of my interpreted programming language SLUG (Simple Language).

The language is currently under heavy development and syntax and other language related things may change.

Feature and bug-fix requests are welcome.

Features

  • Basic structure
  • Functions
  • Variables (int, string, bool)
  • Scopes
  • Boolean expression (myInt == otherInt, "test" == "test", 4 > 3)
  • Conditionals (if, for, while)
  • Internal functions (WriteLine, ReadLine, Random, etc.)
  • Function calls
  • Function parameters
    • Default values for parameters
  • Classes
    • New instance creation
    • Member variables
    • Auto member variable constructor
  • Inline string variables (string s = "Hello $myOtherString", WriteLine("Your rank is $rank with a score of $score"))
  • Inline string expression evaluation (string s = "Number is ${2 + 9}")

Example GuessIt game

The GuessIt game is a simple CLI game where the user needs to guess a random generated number from 1-100. If the guessed number is too small, the game prints that and the other way around until the correct number has been found.

slug-guess-it

TDD (Test Driven Development)

The goal is to get as near as possible to a 100% test coverage and to test every feature while it is being developed.

License

Licensed under the Apache License, Version 2.0.

About

Java implementation of my interpreted programming language SLUG (Simple Language).

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • Java 100.0%