This repository was archived by the owner on Sep 24, 2022. It is now read-only.
Releases: StoryScriptorg/StoryScript
Releases · StoryScriptorg/StoryScript
0.0.2 Alpha - The quality 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
typeoffunction 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(andprint (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 + bLambda expression syntax:
lambda returnType (arguments) => expressionStoryScript 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 Not available for download yet, But will soon!storyscript_lite.zip file. And extract it.
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
StoryScript Alpha 1 (0.0.1a)
These are StoryScript features added in version alpha 1:
- Basic Math operations
- Add
- Subtract
- Multiplication
- Division
- Powering
- Remainders (Modulo)
- If statement
- Variables (with Type checking)
- Ternary operator
- Switch case statement
Note that multiple lines statements are not supported yet.