项目作者: viorelyo

项目描述 :
Qwertz is a new programming language with multilanguage support.
高级语言: Java
项目地址: git://github.com/viorelyo/Qwertz.git
创建时间: 2019-07-15T20:40:44Z
项目社区:https://github.com/viorelyo/Qwertz

开源协议:

下载


Qwertz

Qwertz is an esoteric programming language with multilanguage support.

Already Implemented

  • Integers, Floats
  • Basic operations : +-*/()
  • Constants
  • Assignment operator, variables
  • Print keyword

    1. integerVar = 4 + 6 + YOLO
    2. print integerVar

    52.0

  • Strings, strings operations : =* (concat)

    1. stringVar = "yo" * 3
    2. afișează stringVar

    yoyoyo

  • Conditional operators : < <= > >= == !=

  • Block statements
  • Boolean operators : && ||
  • Branching : if, else

    1. qwertz = 42.99
    2. falls (qwertz > 42)
    3. {
    4. print "yay!"
    5. print " QWERTZ is amazing\n"
    6. }
    7. иначе
    8. drücke "meh\n"

    yay! QWERTZ is amazing

  • Comments : singleline // , multiline /* */

  • Loop control : continue & break
  • for \ while \ do-while loops

    1. for (i = 0 : i < 10 : i = i + 2) {
    2. print "i = " + i
    3. if i == 4
    4. стопэ
    5. print ", "
    6. }

    i = 0.0, i = 2.0, i = 4.0

  • System functions : sin, cos, fancyPrint

    1. fancyPrint(1, 2, 3, 4, 5, YOLO)

    1.0 2.0 3.0 4.0 5.0 42.0

  • User defined functions : fun

    1. fun sum(a, b) {
    2. a = a + 4
    3. fancyPrint(a, " ", b, "\n")
    4. return a + b
    5. }
    6. a = 1
    7. print sum(a, 2)

    5.0 2.0
    7.0

Features

  • Multilanguage support for keywords RO \ EN \ DE \ RU

    Pardon some of my keywords :)

  • Visual Studio Code Extension for Qwertz : qwertz.vscode-extension

Program Demo

Code Example:

  1. /*
  2. Example
  3. of
  4. multiline
  5. comment
  6. */
  7. arr = [1, "text", 1+1, [2 + 3]]
  8. print arr + "\n"
  9. arr[0] = arr[0] + 1000 + arr[1]
  10. fun println(i) {
  11. print "i = " + i + "\n"
  12. }
  13. // So work strings
  14. word = "yay " + "nice"
  15. drücke word + "\n"
  16. // So work numbers
  17. yo = 5.5 * 2 - 1 + YOLO
  18. print yo
  19. print "\n"
  20. // So work conditionals
  21. if (40 > 50) || (50 != 60) {
  22. печать "true\n"
  23. print "true1\n"
  24. }
  25. altfel {
  26. afișează "false\n"
  27. i = 0
  28. while (i < 10) {
  29. print "i = " + i + "\n"
  30. i = i + 1
  31. if i == 4
  32. oprește
  33. }
  34. for (i = 0 : i < 10 : i = i + 2) {
  35. print "i = " + i + "\n"
  36. if i == 4
  37. continue
  38. }
  39. do {
  40. println(i)
  41. i = i - 1
  42. } while (i >= 0)
  43. }

Built with

  • Java 8
  • Gradle Project
  • Intellij Idea

Visual Studio Code Support

  1. Syntax Highlight

To install Qwertz extension for Visual Studio Code, copy the extension folder qwertz.vscode-extension to extension directory:

  • on Windows: %USERPROFILE%\.vscode\extensions
  • on MAC/Linux: $HOME/.vscode/extensions

Install

  1. From Utils download Jar
  2. Add the path of Jar from your system to Environment Variables
  3. Voilà!

Usage

Open cmd and type: qwertz nameOfYourScript.qwz

Enjoy it ^_^