Skip to main content

Interpreter for the Shrug Programming Language

Project description

ShrugProgrammingLanguage Build Status Coverage Status

WORK IN PROGRESS

Interpreter for the Shrug Programming Language

Shrug is a imperative, dynamically-typed, very very high-level, general-purpose programming language

Language spec

print

n

assignment

n 1

math operators start with ¯\_(ツ)_/¯

addition

¯\_(ツ)_/¯ n 3

subtraction

¯\_(ツ)_/¯ n ¯\_(ツ)_/¯ 3

multiplication

¯\_(ツ)_/¯ n ¯\_(ツ)_/¯¯\_(ツ)_/¯ 4

division

¯\_(ツ)_/¯ n ¯\_(ツ)_/¯¯\_(ツ)_/¯¯\_(ツ)_/¯ 4

modulus

¯\_(ツ)_/¯ n ¯\_(ツ)_/¯¯\_(ツ)_/¯¯\_(ツ)_/¯¯\_(ツ)_/¯ 4

comparators start with ¯\_(ツ)_/¯¯\_(ツ)_/¯

equality

¯\_(ツ)_/¯¯\_(ツ)_/¯ n m

inequality

¯\_(ツ)_/¯¯\_(ツ)_/¯ n ¯\_(ツ)_/¯ m

greater than

¯\_(ツ)_/¯¯\_(ツ)_/¯ n ¯\_(ツ)_/¯¯\_(ツ)_/¯ m

less than

¯\_(ツ)_/¯¯\_(ツ)_/¯ n ¯\_(ツ)_/¯¯\_(ツ)_/¯¯\_(ツ)_/¯ m

logical operators follow a comparator

AND

¯\_(ツ)_/¯

OR

¯\_(ツ)_/¯¯\_(ツ)_/¯

XOR

¯\_(ツ)_/¯¯\_(ツ)_/¯¯\_(ツ)_/¯

conditional

¯\_(ツ)_/¯¯\_(ツ)_/¯¯\_(ツ)_/¯ comparator statement1 ¯\_(ツ)_/¯¯\_(ツ)_/¯¯\_(ツ)_/¯ comparator2 statement2 ¯\_(ツ)_/¯¯\_(ツ)_/¯ <- optional default statement statement2 ¯\_(ツ)_/¯ <- end conditional

iteration

¯\_(ツ)_/¯¯\_(ツ)_/¯¯\_(ツ)_/¯¯\_(ツ)_/¯ n <- run statement n times statement ¯\_(ツ)_/¯ <- end iteration

¯\_(ツ)_/¯¯\_(ツ)_/¯¯\_(ツ)_/¯¯\_(ツ)_/¯ x arr <- for each x in arr statement ¯\_(ツ)_/¯ <- end iteration

¯\_(ツ)_/¯¯\_(ツ)_/¯¯\_(ツ)_/¯¯\_(ツ)_/¯ cond <- run statement while cond is true statement ¯\_(ツ)_/¯ <- end iteration

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

shrug-lang-0.0.1.tar.gz (5.8 kB view hashes)

Uploaded Source

Built Distribution

shrug_lang-0.0.1-py3-none-any.whl (8.0 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page