From e0fe92f69f7576aa43e7d950f6b05ec62ddf06b5 Mon Sep 17 00:00:00 2001 From: David Pichsenmeister <2430996+pichsenmeister@users.noreply.github.com> Date: Sat, 27 Jun 2020 15:37:38 -0700 Subject: [PATCH 1/9] Update calculator.ws --- examples/calculator/calculator.ws | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/calculator/calculator.ws b/examples/calculator/calculator.ws index 8db27a0..caa2c72 100644 --- a/examples/calculator/calculator.ws +++ b/examples/calculator/calculator.ws @@ -9,7 +9,7 @@ HACKL AMOI WOS calc(operator, left, right) { I SCHAU NUR '/': DRAH DI HAM left BRÖCKERL right NA GEH: - GEH SCHEISSN ('invalid operator') + GEH SCHEISSN 'invalid operator' } DRAH DI HAM sum @@ -19,4 +19,4 @@ SCHAU MA MOL { I MAN JA NUR (calc('+', 1, 2)) } LECK OASCH (err) { GSCHISSN GRISSN ('invalid operation') -} \ No newline at end of file +} From f3389eaa21613cf72a6fc1465d4cf48383aadfba Mon Sep 17 00:00:00 2001 From: David Pichsenmeister <2430996+pichsenmeister@users.noreply.github.com> Date: Mon, 29 Jun 2020 12:00:06 -0700 Subject: [PATCH 2/9] Update keywords.json --- keywords.json | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/keywords.json b/keywords.json index 962e8e8..4c1120a 100644 --- a/keywords.json +++ b/keywords.json @@ -9,11 +9,11 @@ "WOS WÜSTN": "if", "WOA NUA A SCHMÄH": "else if", "A SCHO WUASCHT": "else", - "for": "for", + "STRAWANZ MA": "for", "DAMMA WOS": "do", "GEMMA": "while", "GUSCH": "continue", - "in": "in", + "AIZAL": "in", "WOS IS MIT DIR": "switch", "I SCHAU NUR": "case", "PASST SCHO": "break", @@ -25,8 +25,8 @@ "SCHLEICH DI": "delete", "SICHA NET": "false", "NA NO NA NET": "true", - "instanceOf": "instanceof", - "typeof": "typeof", + "WOS BISTN DU FIA A WAPPLA": "instanceof", + "WEM GHERSTN DU": "typeof", "JO GLEI": "await", "OWIZAHRER": "async", "I MAN JA NUR": "console.log", @@ -35,7 +35,7 @@ "DES IS MA ECHT Z'DEPPAT": "process.exit", "KANNST DA VUASTÖHN": "===", "DES GEHT SI SCHO AUS": "==", - "&&": "&&", + "UND ÜBRIGENS": "&&", "GHUPFT WIE GHATSCHT": "||", "WENNST MANST": "=", "AUFI": "+", @@ -46,4 +46,4 @@ "JO EH": "!", "HOST MI": "?", "DANN HOIT NET": ":" -} \ No newline at end of file +} From fa81f351f05d66c1a67bb4e1f26b76b09f1d3d76 Mon Sep 17 00:00:00 2001 From: David Pichsenmeister <2430996+pichsenmeister@users.noreply.github.com> Date: Mon, 29 Jun 2020 12:07:57 -0700 Subject: [PATCH 3/9] Update README.md --- README.md | 55 ++++++++++++++++++++++++++++++++++++------------------- 1 file changed, 36 insertions(+), 19 deletions(-) diff --git a/README.md b/README.md index 4ba8642..8d91a06 100644 --- a/README.md +++ b/README.md @@ -55,6 +55,8 @@ Examples can be found in the [examples](examples) directory. ### Usage +#### Keywords + | WienerScript | JavaScript | | ----- | ----- | | FIX OIDA | const | @@ -63,37 +65,43 @@ Examples can be found in the [examples](examples) directory. | HAWIDERE | new | | I BIMS | this | | HACKL AMOI WOS | function | -| DRAH DI HAM | return | -| WAS WÜSTN | if | -| WOA NUA A SCHMÄH | else if | -| A SCHO WUASCHT | else | -| for | for | +| SCHLEICH DI | delete | +| SICHA NET | false | +| NA NO NA NET | true | +| WOS BISTN DU FIA A WAPPLA | instanceof | +| WEM GHERSTN DU | typeof | +| JO GLEI | await | +| OWIZAHRER | async | +| AIZAL | in | + +#### Control statements + +| WienerScript | JavaScript | +| ----- | ----- | +| STRAWANZ MA | for | | DAMMA WOS | do | | GEMMA | while | | GUSCH | continue | -| in | in | +| WAS WÜSTN | if | +| WOA NUA A SCHMÄH | else if | +| A SCHO WUASCHT | else | | WOS IS MIT DIR | switch | | I SCHAU NUR | case | | PASST SCHO | break | | NA GEH | default | +| DRAH DI HAM | return | | GEH SCHEISSN | throw | | SCHAU MA MOL | try | | LECK OASCH | catch | | SAMMAS ENDLICH | finally | -| SCHLEICH DI | delete | -| SICHA NET | false | -| NA NO NA NET | true | -| instanceOf | instanceof | -| typeof | typeof | -| JO GLEI | await | -| OWIZAHRER | async | -| I MAN JA NUR | console.log | -| DO IS DA HUND BEGROBN | console.debug | -| GSCHISSN GRISSN | console.error | -| DES IS MA ECHT Z'DEPPAT | process.exit | + +#### Operators + +| WienerScript | JavaScript | +| ----- | ----- | | KANNST DA VUASTÖHN | === | | DES GEHT SI SCHO AUS | == | -| && | && | +| UND ÜBRIGENS | && | | GHUPFT WIE GHATSCHT | \|\| | | WENNST MANST | = | | AUFI | + | @@ -105,8 +113,17 @@ Examples can be found in the [examples](examples) directory. | HOST MI | ? | | DANN HOIT NET | : | +#### Functions + +| WienerScript | JavaScript | +| ----- | ----- | +| I MAN JA NUR | console.log | +| DO IS DA HUND BEGROBN | console.debug | +| GSCHISSN GRISSN | console.error | +| DES IS MA ECHT Z'DEPPAT | process.exit | + ## License This project is licensed under the MIT license, Copyright (c) 2020 David Pichsenmeister | pichsenmeister.com. For more information see [LICENSE](LICENSE). -Inspired by [ArnoldJS](https://github.com/pichsenmeister/ArnoldJS) \ No newline at end of file +Inspired by [ArnoldJS](https://github.com/pichsenmeister/ArnoldJS) From 05b0d26930f30739a634f5626c5e6cb11e295209 Mon Sep 17 00:00:00 2001 From: David Pichsenmeister <2430996+pichsenmeister@users.noreply.github.com> Date: Mon, 29 Jun 2020 12:08:56 -0700 Subject: [PATCH 4/9] Update fizzbuzz.ws --- examples/fizzbuzz/fizzbuzz.ws | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/fizzbuzz/fizzbuzz.ws b/examples/fizzbuzz/fizzbuzz.ws index a1a2fb9..1ad8ef3 100644 --- a/examples/fizzbuzz/fizzbuzz.ws +++ b/examples/fizzbuzz/fizzbuzz.ws @@ -1,4 +1,4 @@ -for ( +STRAWANZ MA ( OIDA n WENNST MANST 1; n <= 100; n WENNST MANST n AUFI 1 ) { OIDA out WENNST MANST ""; @@ -7,4 +7,4 @@ for ( WOS WÜSTN (JO EH(n S'RESTL 5)) out WENNST MANST out AUFI "Buzz"; I MAN JA NUR (out HOST MI out DANN HOIT NET n); -} \ No newline at end of file +} From e324b5ddaf7b8598cf4bedf0d5da91121855cde3 Mon Sep 17 00:00:00 2001 From: David Pichsenmeister <2430996+pichsenmeister@users.noreply.github.com> Date: Mon, 29 Jun 2020 12:10:27 -0700 Subject: [PATCH 5/9] Update mergesort.ws --- examples/mergesort/mergesort.ws | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/mergesort/mergesort.ws b/examples/mergesort/mergesort.ws index a1b7243..2679d45 100644 --- a/examples/mergesort/mergesort.ws +++ b/examples/mergesort/mergesort.ws @@ -17,7 +17,7 @@ HACKL AMOI WOS merge( OIDA leftIndex WENNST MANST 0; OIDA rightIndex WENNST MANST 0; - GEMMA (leftIndex < left.length && rightIndex < right.length) { + GEMMA (leftIndex < left.length UND ÜBRIGENS rightIndex < right.length) { WOS WÜSTN (left[leftIndex] < right[rightIndex]) { result.push(left[leftIndex++]); } A SCHO WUASCHT { @@ -35,4 +35,4 @@ HACKL AMOI WOS merge( I MAN JA NUR ( mergesort(array) -); \ No newline at end of file +); From 5e00670c5dc264abb73f8e4e8b5543e7c2700500 Mon Sep 17 00:00:00 2001 From: David Pichsenmeister <2430996+pichsenmeister@users.noreply.github.com> Date: Mon, 29 Jun 2020 12:13:06 -0700 Subject: [PATCH 6/9] Update keywords.json --- keywords.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/keywords.json b/keywords.json index 4c1120a..c830431 100644 --- a/keywords.json +++ b/keywords.json @@ -28,7 +28,7 @@ "WOS BISTN DU FIA A WAPPLA": "instanceof", "WEM GHERSTN DU": "typeof", "JO GLEI": "await", - "OWIZAHRER": "async", + "OWIZAHRA": "async", "I MAN JA NUR": "console.log", "DO IS DA HUND BEGROBN": "console.debug", "GSCHISSN GRISSN": "console.error", From 3ffe9edc4594e0d5fb4f70187eee6aa9f6923eac Mon Sep 17 00:00:00 2001 From: David Pichsenmeister <2430996+pichsenmeister@users.noreply.github.com> Date: Mon, 29 Jun 2020 12:13:32 -0700 Subject: [PATCH 7/9] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 8d91a06..850f97b 100644 --- a/README.md +++ b/README.md @@ -71,7 +71,7 @@ Examples can be found in the [examples](examples) directory. | WOS BISTN DU FIA A WAPPLA | instanceof | | WEM GHERSTN DU | typeof | | JO GLEI | await | -| OWIZAHRER | async | +| OWIZAHRA | async | | AIZAL | in | #### Control statements From 8fd7d49d49cdee45a66ec60f09ef7460fb30e542 Mon Sep 17 00:00:00 2001 From: David Pichsenmeister <2430996+pichsenmeister@users.noreply.github.com> Date: Mon, 29 Jun 2020 12:19:16 -0700 Subject: [PATCH 8/9] Update README.md --- README.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/README.md b/README.md index 850f97b..c360a9b 100644 --- a/README.md +++ b/README.md @@ -104,11 +104,17 @@ Examples can be found in the [examples](examples) directory. | UND ÜBRIGENS | && | | GHUPFT WIE GHATSCHT | \|\| | | WENNST MANST | = | +| ANS AUFI | ++ | | AUFI | + | +| ANS OWI | ++ | | OWI | - | | HAUTS EICH ZAM | * | | BRÖCKERL | / | | S'RESTL | % | +| WENGA | < | +| GRESSA | > | +| | <= | +| | >= | | JO EH | ! | | HOST MI | ? | | DANN HOIT NET | : | From 84239d16cddd2772f320155c905a6c66362fb2a3 Mon Sep 17 00:00:00 2001 From: David Pichsenmeister <2430996+pichsenmeister@users.noreply.github.com> Date: Mon, 29 Jun 2020 12:19:57 -0700 Subject: [PATCH 9/9] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index c360a9b..27a0b69 100644 --- a/README.md +++ b/README.md @@ -106,7 +106,7 @@ Examples can be found in the [examples](examples) directory. | WENNST MANST | = | | ANS AUFI | ++ | | AUFI | + | -| ANS OWI | ++ | +| ANS OWI | -- | | OWI | - | | HAUTS EICH ZAM | * | | BRÖCKERL | / |