Giter Site home page Giter Site logo

nommiin / gloop Goto Github PK

View Code? Open in Web Editor NEW
6.0 3.0 0.0 5 KB

one bad gloop, and she do what i yoinky two big splurgs and a big ass gloopy three more yoinks, then i buy me a smoothie poured up a gloop, that's a gloop and a splurgy

License: The Unlicense

JavaScript 100.00%

gloop's Introduction

gloop

one bad gloop, and she do what i yoinky two big splurgs and a big ass gloopy three more yoinks, then i buy me a smoothie poured up a gloop, that's a gloop and a splurgy

Usage

instantiate the gloop class and provide your code as the first argument, then call the Parse method to parse your code and the Run method to run your code

Syntax

Types

  • String: use double quotes to define a string
  • Numbers: write any number, uses parseFloat internally
  • Statements: surround operands in { and }

Functions:

  • one bad

    • Takes value to the right and pushes it to the stack
  • gloop

    • Adds the top two values from the stack together and pushes the result to the stack
  • do what i yoinky

    • Prints out the top value from the stack
  • two big splurgs

    • Uses a statement and takes two operands and immediately adds them then pushes the result to the stack
  • three more yoinks

    • Like the two big splurgs instruction, takes three operands and adds them together; pushing the result to the stack
  • gloop and a splurgy

    • Ends the program execution at any point

Comments

  • //: Single line comments are supported
  • /*: Multi line comments are supported but probably wonky

Example

(as seen in main.js)

// Push values to stack with "one bad"
one bad "Hello "
one bad "World"
gloop

// Print out value on stack
do what i yoinky


// Add 2 values at once and push to stack
two big splurgs {
    32,
    64
}

// Print out value on stack
do what i yoinky

// Add 3 values at once and push to stack
three more yoinks {
    "then I buy ",
    "me a ",
    "smoothie"
}

// Print out value on stack
do what i yoinky

// End execution
gloop and a splurgy

Notes

Please don't ask me to work on this anymore than the 2 hours I spent

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.