Skip to content

Zetnex/Kubus

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Kubus

Welcome to Kubus, a unique programming language designed for simplicity, flexibility, and seamless transpilation! With Kubus, you can write expressive, concise code that can be effortlessly transpiled into PHP, opening up endless possibilities for cross-platform development and experimentation.

  1. Custom Syntax:

    • Shorthand keywords like ns for namespace, pu for public, and fre for foreach.
    • Unique symbols such as $$ for local variables and $$$ for static local variables.
  2. Lexical Structure:

    • Supports keywords, operators, literals, and delimiters.
    • Includes common data types like int, float, string, char, bool, and void.
    • Operators include arithmetic (+, -, *, /), comparison (==, !=, >, <), and increment/decrement (++, --).
  3. Parsing and Syntax:

    • Constructs an Abstract Syntax Tree (AST) for statements like if, foreach, return, and variable declarations.
    • Supports blocks, expressions, and array operations (e.g., appending values).
  4. Control Flow:

    • Includes if-else and foreach constructs.
    • Allows return statements and expression-based statements.
  5. Variable Handling:

    • Supports static and local variables with increment and decrement operations.
    • Handles array operations, including indexed assignments and appends.
  6. Error Handling:

    • Provides detailed error messages with token type, value, and position.
  7. Transpilation:

    • Designed to transpile Kubus code into PHP and Kubus itself, enabling cross-platform development.
  8. Comments and Whitespace:

    • Supports single-line (//) and multi-line (/* */) comments.
    • Handles whitespace and punctuation effectively.
  9. Focus on Simplicity:

    • Lightweight and expressive, with a focus on clarity and efficiency.

Disclaimer: This project is in early development. Syntax may change drastically until first beta versions. Not recommended for heavy development of critical code.

About

A lightweight and modern syntax for php

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages