Skip to content
This repository was archived by the owner on Sep 24, 2022. It is now read-only.

Syntax & How StoryScript works

Satakun Utama edited this page May 15, 2021 · 1 revision

This section will describe the StoryScript syntax.

In StoryScript, You don't have to put a semicolon (;) at the end of the line.

Spacing

In StoryScript, Spacing is the most important thing. For example:

This code:

typeof("message")

And this code:

typeof ("message")

Which one is correct? The answer is The second one. Because in StoryScript you have to always add a space after a Function name before an Argument input.

How StoryScript parse the command

StoryScript parses the command you put weirdly. Because StoryScript parses your instructions like this: StoryScript Execution flow Diagram

* = This Checks does not exist in the Real program. The Real process is:

  • Run function call CommandTrimmer to trim and split the command
  • Lexer analyze the Command
  • Lexer call parser to analyze the Expression
  • Parser calls Executor to execute something
  • Executor done and return to Parser
  • Parser then return the value to Lexer
  • Lexer then return the value to Run function
  • Run function then return the output to the shell
  • Shell displays the output
Clone this wiki locally