-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #61 from stormprograms/dev
StormScript v0.6.0
- Loading branch information
Showing
42 changed files
with
413 additions
and
61 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# StormScript v0.6.0 "Fig" | ||
|
||
## What's new | ||
* StormScript can now read and write to files | ||
* StormScript now has modules, which allow you to run functions from other StormScript files. | ||
* use `random` to generate a random bool | ||
* use `randomrange => min, max;` to generate a random integer in range min, max | ||
* use `wait INT` to sleep for `INT` seconds | ||
|
||
## What's Fixed | ||
* else and else if statements were broken | ||
* length didn't work when used in function inside args | ||
* while loops would cause the parser to increase the current line to the point where it was outside of the scope. | ||
* Functions run at the end of other functions caused segmentation faults due to failing to parse a semicolon | ||
* Global variables couldn't be declared | ||
* comparisons using subscripts were broken | ||
* length did not change on modification | ||
* `stsvars::glob` was considered to be true by some compilers, causing crash |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# Testing | ||
|
||
## How often should new tests be added? | ||
When you are adding new features (not patches) tests should be added. | ||
|
||
## How can I generate outputs? | ||
Run `scripts/writenewouts.sh` | ||
|
||
## How can I run tests? | ||
Run `scripts/runtests.sh` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,5 @@ | ||
do{ | ||
x: 3; | ||
y: 10; | ||
while x not y { | ||
x+: 1; | ||
printl x; | ||
} | ||
printl "Waiting"; | ||
wait 10; | ||
printl "I waited for 10 seconds"; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
#pragma once | ||
#ifndef MODULES_H_ | ||
#define MODULES_H_ | ||
|
||
#include "includes.h" | ||
#include "core.h" | ||
|
||
// Module read function | ||
std::vector<string> readmod(string name); | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
#pragma once | ||
#ifndef STSRAND_H_ | ||
#define STSRAND_H_ | ||
|
||
#include "includes.h" | ||
|
||
#include "variables.h" | ||
|
||
int genrandomintfromrange(sts *s, std::vector<stsvars> vars, int *line); | ||
bool randombool(); | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.