Skip to main content

Interpreter for the Shrug Programming Language

Project description

ShrugProgrammingLanguage Build Status Coverage Status

Interpreter for the Shrug Programming Language

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

Example

>> a 10
>> b 11
>>
>> # Arithmetic operations
>> ¯\_()_/¯ a 3
13
>> ¯\_()_/¯ "str" "ing"
string
>> ¯\_()_/¯ a ¯\_()_/¯ 3
7
>> ¯\_()_/¯ a ¯\_()_/¯ ¯\_()_/¯ b
110
>> ¯\_()_/¯ a ¯\_()_/¯ ¯\_()_/¯ ¯\_()_/¯ 3
3
>> ¯\_()_/¯ b ¯\_()_/¯ ¯\_()_/¯ ¯\_()_/¯ ¯\_()_/¯ 4
3
>>
>> # Comparisons
>> ¯\_()_/¯ ¯\_()_/¯ a b
False
>> ¯\_()_/¯ ¯\_()_/¯ a ¯\_()_/¯ ¯\_()_/¯ b
False
>> ¯\_()_/¯ ¯\_()_/¯ a ¯\_()_/¯ ¯\_()_/¯ ¯\_()_/¯ ¯\_()_/¯ ¯\_()_/¯ b
True
>>
>> # Conditional statements
>> ¯\_()_/¯ ¯\_()_/¯ ¯\_()_/¯ True
>>  "printed"
printed
>> ¯\_()_/¯ ¯\_()_/¯ ¯\_()_/¯ False
>>  "not printed"
>> ¯\_()_/¯ ¯\_()_/¯ ¯\_()_/¯ ¯\_()_/¯ ¯\_()_/¯ a ¯\_()_/¯ ¯\_()_/¯ ¯\_()_/¯ ¯\_()_/¯ b
>>  "a is less than b"
a is less than b

Usage

Requires Python 3.6+

Install

pip install shrug-lang

Start interpreter

shruglang

To run a file:

cat program.shrug | shruglang

Language spec

Language spec can be found here

Syntax highlighting

Syntax highlighting for sublime can be found here

Shrug sublime syntax highlighting

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.1.0.tar.gz (9.9 kB view hashes)

Uploaded Source

Built Distribution

shrug_lang-0.1.0-py3-none-any.whl (13.8 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