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 py3

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page