1.1.0 • Published 4 years ago

wienerscript v1.1.0

Weekly downloads
3
License
MIT
Repository
github
Last release
4 years ago

WienerScript

HACKL AMOI WOS calc(operator, left, right) {
    WOS IS MIT DIR (operator) {
        I SCHAU NUR '+':
            DRAH DI HAM left AUFI right
        I SCHAU NUR '-':
            DRAH DI HAM left OWI right   
        I SCHAU NUR '*':
            DRAH DI HAM left HAUTS EICH ZAM right   
        I SCHAU NUR '/':
            DRAH DI HAM left BRÖCKERL right
        NA GEH:
            GEH SCHEISSN 'invalid operator'          
    }
}

SCHAU MA MOL {
    I MAN JA NUR (calc('+', 1, 2))
} LECK OASCH (err) {
    GSCHISSN GRISSN ('invalid operation')
}

WienerScript adds syntactic sugar to JavaScript that makes it less forgiving, more emotional, and even painful to write, allowing you to do less with more code.

Common Viennese phrases and words act as intuitive replacements for common JavaScript keywords, operators, and more. You can continue to use raw JavaScript inside WienerScript, and the wienerscript transpiler will convert WienerScript code into raw JavaScript.

Installation

WienerScript requires Node.js and npm.

npm install -g wienerscript

Usage:

wienerscript

All files in that directory (and any subdirectories) that have a valid WienerScript file extensions (.ws) will be replaced by the transpiled contents of in the /dist directory. Input files conventionally use the .ws extension and output files conventionally use the .js extension.

Examples can be found in the examples directory.

Usage

Keywords

WienerScriptJavaScript
FIX OIDAconst
OIDAlet
ALSO DES IS AMOI NIXnull
HAWIDEREnew
I BIMSthis
HACKL AMOI WOSfunction
SCHLEICH DIdelete
SICHA NETfalse
NA NO NA NETtrue
WOS BISTN DU FIA A WAPPLAinstanceof
WEM GHERSTN DUtypeof
JO GLEIawait
OWIZAHRAasync
AIZALin

Control statements

WienerScriptJavaScript
STRAWANZ MAfor
DAMMA WOSdo
GEMMAwhile
GUSCHcontinue
WOS WÜSTNif
WOA NUA A SCHMÄHelse if
A SCHO WUASCHTelse
WOS IS MIT DIRswitch
I SCHAU NURcase
PASST SCHObreak
NA GEHdefault
DRAH DI HAMreturn
GEH SCHEISSNthrow
SCHAU MA MOLtry
LECK OASCHcatch
SAMMAS ENDLICHfinally

Operators

WienerScriptJavaScript
KANNST DA VUASTÖHN===
DES GEHT SI SCHO AUS==
UND ÜBRIGENS&&
GHUPFT WIE GHATSCHT||
WENNST MANST=
ANS AUFI++
AUFI+
ANS OWI--
OWI-
HAUTS EICH ZAM*
BRÖCKERL/
S'RESTL%
WENGA<
GRESSA>
HOIT NET GRESSA<=
HOIT NET KLANA>=
JO EH!
HOST MI?
DANN HOIT NET:
HUACH ZUA=>

Functions

WienerScriptJavaScript
I MAN JA NURconsole.log
DO IS DA HUND BEGROBNconsole.debug
GSCHISSN GRISSNconsole.error
DES IS MA ECHT Z'DEPPATprocess.exit
HEASTalert

License

This project is licensed under the MIT license, Copyright (c) 2020 David Pichsenmeister | pichsenmeister.com. For more information see LICENSE.

Made by @pichsenmeister. Inspired by ArnoldJS.

1.1.0

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago