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

0.0.2 Alpha - The quality release

Latest
Compare
Choose a tag to compare
@lines-of-codes lines-of-codes released this 23 Aug 13:42
· 37 commits to main since this release

This release contains multiple quality improvements and various bug fixes.
Here's the changelog for this release.

  • Added Original text-based parsing for more precision parsing. (Only for some methods)
  • Added variable detection in math parser.
  • Added arrays
  • Added lambda expression
  • Move static unchanged constants outside of the analyse_command method
  • [Styling] Rename multiple methods to snake_case
  • Make typeof function return a string instead of Types enum
  • Added type conversion methods
    • int.FromString - Converts a string to int
    • int.FromFloat - Converts float to int
    • int.IsFloatFullNumber - Check If a float is a full number (example: 3.0 = true, 3.14 = false)
    • integerVariable.ToString - Converts an integer variable to String
    • string.FromInt/string.FromFloat - converts Integer/Float to String.
  • Added type "Action" for a lambda expression
  • Lambda expression
  • Added new exception, "InvalidOperatorException" (ID: 109)
  • Move SymbolTable class to SymbolTable.py
  • Added bitwise operators (NOT, OR, AND, XOR, bitwise left shift, bitwise right shift)
  • Added direct boolean comparison support in if statement
  • Space safe function calls (now, print( and print ( will be both valid, this applies to all functions)
  • Move escape character parsing to math parser, (and this added support for escaping quotes too)
  • You can now execute files through the shell executable

Lambda expression

Lambda expression example:

Action add = lambda int (int a, int b) => a + b

Lambda expression syntax:

lambda returnType (arguments) => expression

StoryScript Lite

StoryScript lite is a minified version of StoryScript - Note that this shouldn't be used for development/debugging build. As most debugging features are removed.

You can download StoryScript lite by downloading the storyscript_lite.zip file. And extract it. Not available for download yet, But will soon!

Downloading the REPL

To get the REPL, Download StoryScript-v0.0.2-Shell.zip, and then extract it, and you can run the shell.exe easily to get the REPL running.

Example of executing a file:

shell.exe -i main.sts