Giter Site home page Giter Site logo

abrainybunch / oxido Goto Github PK

View Code? Open in Web Editor NEW

This project forked from oxidic/oxido

0.0 0.0 0.0 51 KB

Oxido is a dynamic interpreted programming language basing most of its syntax on Rust.

Home Page: https://language.megatank58.me

License: MIT License

Rust 100.00%

oxido's Introduction

Oxido

Oxido is a dynamic interpreted programming language basing most of its syntax on Rust. Conventionally, the files may end with the o extension, however Oxido ignores the extension.

Installation

Oxup, the official installer can be used to install the latest release from GitHub.

oxup install

Uninstallation

You can use oxup to remove the current installation.

oxup uninstall

Syntax

Data types

  • String: A string is any value inside " (double quotes) passing the regex \"[A-Za-z0-9 !]+\".

  • Integer: Integers (no fractions), passing the regex [0-9]+.

Variables

Variables are declared by the let keyword, followed by a space and the identifier, which must pass the regex [A-Za-z]+, followed by an equals sign and the value which must be a single string or an integer or an expression of integers, or a variable itself.

For example:

let a = "Hi mom!";
let a = 5;
let a = 5 * 5;

Reassignments

Reassignments are done stating the identifier, which must pass the regex [A-Za-z]+, followed by an equals sign and the value which must be a single string or an integer or an expression of integers, or a variable itself.

let a = 0;
a = "Hi mom!";
a = 5;
a = 5 * 5;

Printing

The print keyword can be used to print variables, expressions and strings to stdout, the value must be inside two parentheses.

print(a);
print(5);
print(5 * 5);
print("Hello world");

If statements

If statements check whether the given condition is true or not using the == or < or > operator. The == is applicable on strings and integers both, while < or > can only be used on integers. The condition must be followed after the code to be executed in the case the condition is true in curly braces {}.

if a == 5 {
    print(a);
}

Loop statements

Loop statements repeat given conditions until break is called.The conditions to be executed in the loop must be followed after the loop keyword in {}.

let b = 0;

loop {
    b = b + 1;

    if b == 5 {
        print("Hi mom!");
        break;
    }

    print(b);
}

oxido's People

Contributors

megatank58 avatar realm2100 avatar apoorvcodes avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.