Skip to content

A scripting language intented to be used with rustmania, still in its early stages

Notifications You must be signed in to change notification settings

RGates94/scripting-language

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

59 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Scripting Language

This project is an early stage scripting language intended to be used with RustMania. The primary goal is making the language easy to learn, read, and integrate with Rust.

Grammar

This is a grammar for the currently implemented features:

Program := [Declaration]*

Declaration := [Assignment | Function]

Assignment := [Identifier][=][Expression][\n]

Identifier := [a-zA-Z][a-zA-Z0-9]*

Expression := [Identifier | Literal | [Expression][Operator][Expression] ]

Literal := [Integer | Float]

Integer := [0-9]+

Float := [0-9]+[.][0-9]+

Operator := [+ | - | *]

Function := [fn][Identifier][(][Identifier]*[)][\n][Statement]*[Expression]

Statement := [Assignment | While | If]

While := [while][Expression][Statement]*[end]

If := [if][Expression][Statement}*[else]?[Statement]*[end]

About

A scripting language intented to be used with rustmania, still in its early stages

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages