Note: This is meant to be a proof of concept for Lunar's usability!
We have taken advantage of the following Lunar features (at the time of writing)
- Class Inheritance
- Static methods
- Lambda expressions
- Self-assignment operators (only
..=was used in this project)
Lexer class attempts to group your message based on its syntax. If you write
"hello world", you get back
hello world as one single object.
By default, we have a
@ prefix which signals to Commander that your message invokes a command.
The first object is the alias, which can be in the following format:
"hello world", both of which is one alias.
Although every arguments in Commander is an array of objects, we support multiple objects in one single argument, which takes the syntax:
one, two, three, four. This is all one argument that has four objects. So with
@teleport one, two, "player three", four me, its first object:
teleport, first argument is an object which is an array of objects:
one, two, "player three", four, and second argument is one object:
So these are valid commands for Commander:
@"send message" random "hehe lol",
@teleport one, two, "player three", four me.