GithubHelp home page GithubHelp logo

crayon's Introduction

Crayon

An interpreted programming language written in Go for idiots.

What the Fuck?

There are only tags, values, constant values, commands (statements), variables and scope. Well, for now.

How to Use

./cor.sh <File>

This bash script will build the engine and run it.

What the Fuck is a Tag?

It works like a function.

Kinds of Tag

1. MAIN

[MAIN]

It will execute when the engine ready.

2. FRAME

[FRAME XX]

It will execute after XX seconds.

3. LOOP

[LOOP]

It will execute every time until you exit the program.

4. Custom

[@AnyName]

Your own named tags! This type of tag can be called by your code.



ProTip: If you want to end a tag, just use ``` ~ ```

Kinds of Value

1. String

"This is a string"


2. Number (Float 64)

10.10


3. Bool

#yes
#no


4. PI

#PI


5. Object (Untested)

#{
    key1 = <Any>,
    key2 = <Any>
}


6. Array

#[<Any>, <Any>]


7. None (Untested)

#none


8. Scope (Untested)

{
    Command1
    Command2
}

Yeah scope is a value.

Commands

1. Exit the program

K THX BYE;


2. Console

write <Any> to console;


3. Define

define variable $[variable];


4. Assign

assign value <Any> to $[variable];


5. Delete

delete variable $[variable];


6. Global

make variable $[variable] global;


7. Math Operators

add <Number> by <Number>;
sub <Number> by <Number>;
divide <Number> by <Number>;
multiply <Number> by <Number>;


8. Logical Operators (All the results are <Bool>)

is <Any> equal with <Any>;
is <Any> not equal with <Any>;

not <Bool>;

is <Number> less than <Number>;
is <Number> less than or equal with <Number>;

is <Number> more than <Number>;
is <Number> more than or equal with <Number>;

<Bool> and <Bool>;
<Bool> or <Bool>;


Protip: You can use commands within commands like

command1 @(command2);


9. If Else

if <Bool> {
    this is scope
}

if <Bool> {
    this is scope
} else {
    this is scope
}


10. Get & Call Custom Tag

call tag @[CustomTagName] with args <Array>;

To get the arguments in the custom tag, the custom tag just need to get the variable $args.

11. Get Property

get property <Number> from <Array>;
get property <String> from <Object>;


12. Set Property

set <Any> as property <Number> from <Array>;
set <Any> as property <String> from <Object>;


13. Get Type Of (Untested)

get type of <Any>;

14. Run Scope (Untested)

run scope {
    Command1
    Command2
};


crayon's People

Contributors

symful avatar

Stargazers

 avatar  avatar

Watchers

 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.