Skip to content

etorlic/Cringe--

Repository files navigation

alt text

Cringe--

Hi, I'm a Scorpio.

Cringe-- is a language crafted upon the cringeist topics and coding practices of our modern era. Every line of code that you write will have you cringing in disgust as you attempt to write functional code. We created Cringe-- because we were tired of all the BASIC programming languages and wanted to add a little more litness to our coding practices.

Feel free to check out our pogchamp website here!

Building

Nodejs is required to build and run this project. Make sure you have a recent version of Node, since the source code uses a fair amount of very modern JavaScript.

Clone the repo, then run npm install. You can then run npm test.

Usage

To run from the command line: node src/cringe--.js <filename> <outputType>

The outputType indicates what you wish to print to standard output:

OptionDescription
ast outputs the Abstract Syntax Tree
analyzed outputs the decorated Abstract Syntax Tree
optimized outputs the optimized decorated Abstract Syntax Tree
js The translation of a Cringe-- program to JavaScript

Some Features

  • Statically Typed
  • Data Structures like Python
  • End your statements with two semicolons
  • Compare using = and assign using ==

Examples

Hello World

JavaScriptCringe--

console.log("Hello, World!")

retweet:"Hello, World!":;;

Declarations

JavaScriptCringe--

x = true

boolin x == based;;

Conditionals

JavaScriptCringe--
  let x = 5
  if (x==5) {
    console.log(x)
  }
  pog x == 5;;
  vibeCheck :x=5: { 
    retweet:x:;;
  }

Loops

JavaScriptCringe--
  let x = 0
  while (x<10) {
    console.log(x)
    x = x + 1
  }
  pog x == 0;;
  infiniteLoop :x<10: { 
    retweet:x:
    x == x + 1 ;;
  }

Data Structures

JavaScriptCringe--
  let emptyList = []
  let nonEmptyList = [1,2,3,4]
  int[] emptyList == [];;
  int[] nonEmptyList == [1,2,3,4];;

Functions

JavaScriptCringe--
  function exampleFunction(vibe) {
    if (vibe) {
      return true
    } else {
      return false
    }
  }
  flossin boolin exampleFunction:boolin vibe: { 
    vibeCheck :vibe=based: {
      dab based;;
    } badVibes {
      dab unbased;;
    }

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published