Skip to content

A programming language/JS superset made for Node beginners, and people who want a different Node experience

Notifications You must be signed in to change notification settings

itisdoc/EnScript

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

41 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

EnScript

NEW! Pages | download

Welcome to EnScript!

This is a Easy-to-use Node.js superset (hence the name, "EnScript") that I made for Node beginners, and people that want a different type of Node.js. You can use normal Node with it aswell.

.en VS .en.native

Note: This is for the v2.0 update. If you want this feature ASAP, then get the release

Comparison between the two:

File Extension Pros Cons
.en - More like a seperate language than a superset May be confusing at first

Does not have backwards compatibility with v1.1
.en.native - More like a superset
- Has better JavaScript support
- Most syntax is removed so you can use plain JavaScript along with EnScript
Does not have backwards compatibility with v1.1

Installation/Usage

  1. Download the runCode.js
  2. Make a script.en file that looks something like this:
    console.log['Hello World!'];

3. Go to the path of both files and run this code in the terminal
node runCode.js [name-Of-En-File]

Syntax / Examples

Here is an example of console logging (the famous "Hello World!" one)

console.log['Hello World!'];

Here is another example, with functions.

function test() ~>
console.log['Wowie!'];
<~

test();      

Now, see how some lines have the character ;? It helps the interpreter know it's the end of a line (so there are no errors).

Let's do one more example. A Discord bot!

!! this code has been tested by us, and should work!
@variable Discord = import['discord.js'];
@variable client = new Discord.Client();

client.on['ready', () :: ~>
  console.log[`Ready as ${client.user.username}`];
<~];

client.on['message', (message) :: ~>
  if (message.content == "ping") ~>
    message.reply('Pong!');
  <~
<~];

client.login['YOUR_TOKEN_HERE'];

This code seems a little different than Node.js.

More of the README is being worked on and is coming soon!

If you want, check out the docs

About

A programming language/JS superset made for Node beginners, and people who want a different Node experience

Resources

Stars

Watchers

Forks

Packages

No packages published