You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Apr 20, 2026. It is now read-only.
Copy file name to clipboardExpand all lines: README.md
+15-13Lines changed: 15 additions & 13 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,7 +7,7 @@ SuperlativeScript is a fork of HScript with fixes and improvements.
7
7
## Installation
8
8
`haxelib install SScript`
9
9
10
-
Enter this command in command prompt to get the latest release from Haxe library.
10
+
Enter this command in the command prompt to get the latest release from the Haxe library.
11
11
12
12
After installing SScript, don't forget to add it to your Haxe project.
13
13
@@ -28,7 +28,7 @@ Add this to `build.hxml` to add SScript to your Haxe build.
28
28
Haxe definition `hscriptPos` is deprecated and shouldn't be used unless you also want to use vanilla HScript.
29
29
30
30
## Usage
31
-
To use SScript, you will need a file or a script. Using a file is recommended.
31
+
To use SScript, you will need either a file or a script. Using a file is recommended.
32
32
33
33
### Using without a file
34
34
```haxe
@@ -53,7 +53,7 @@ import hscript.SScript;
53
53
54
54
class Main {
55
55
static function main() {
56
-
var script:SScript = new SScript("script.hx"); // Has the same contents with the script above
56
+
var script:SScript = new SScript("script.hx"); // Contains the same code as the script above
57
57
var randomNumber:Float = script.call('returnRandom').returnValue;
58
58
}
59
59
}
@@ -72,7 +72,7 @@ class Main {
72
72
var script:SScript = new SScript();
73
73
script.doString("
74
74
import Date;
75
-
trace(Data.now());
75
+
trace(Date.now());
76
76
");
77
77
}
78
78
}
@@ -114,7 +114,7 @@ class Main
114
114
```
115
115
116
116
#### String Interpolation
117
-
SScript supports string interpolation. Just like normal haxe, special identifiers, denoted by the dollar sign `$` within a String enclosed by single-quote `'` characters, are evaluated as if they were concatenated identifiers.
117
+
SScript supports string interpolation. Just like in Haxe, special identifiers denoted by the dollar sign `$` within a string (enclosed by single quotes `'`) are evaluated as expressions.
118
118
119
119
```haxe
120
120
import hscript.SScript;
@@ -163,14 +163,15 @@ class Main {
163
163
}
164
164
```
165
165
166
-
You can still create regular expression with regular syntax:
166
+
You can still create regular expressions using the standard syntax:
167
167
```haxe
168
168
var r = new EReg("haxe", "i");
169
169
```
170
170
171
171
##### Limitations
172
-
With faulty EReg's, Haxe may show corrupted error messages. These errors are uncatchable and will crash the session.
173
-
Sometimes, Haxe may not show error messages. If this happens, session will be caught in a loop and it will become unresponsive.
172
+
With faulty EReg instances, Haxe may produce corrupted error messages. These errors cannot be caught and may crash the session.
173
+
174
+
Sometimes, Haxe may not display error messages. If this happens, the session may enter a loop and become unresponsive.
174
175
175
176
Platform limitations also apply here, the flag `u` is only available in C++ and Neko.
176
177
Flag `s` is not available in C# and JavaScript.
@@ -221,12 +222,13 @@ class Main {
221
222
## Presetting System
222
223
Presets are the variables that get set before the script gets executed.
223
224
224
-
SScript has a presetting system where you can set multiple preset modes
225
-
to customize presetting. Currently it has 4 modes, `NONE`, `MINI`, `REGULAR` and `FULL`.
225
+
SScript has a presetting system that allows you to configure multiple preset modes.
226
+
227
+
Currently, it includes 4 modes: `NONE`, `MINI`, `REGULAR`, and `FULL`.
226
228
227
-
-`MINI`only contains basic classes and extremely lightweight,
228
-
-`REGULAR`contains slightly more and it includes more common classes aswell.
229
-
-`FULL`contains all existing classes, expensive when there are many scripts being handled. (Avaiable only if `DISABLED_MACRO_SUPERLATIVE` is undefined)
229
+
-`MINI` contains only basic classes and is extremely lightweight.
230
+
-`REGULAR` includes more commonly used classes.
231
+
-`FULL`includes all available classes and can be expensive when handling many scripts. (Available only if `DISABLED_MACRO_SUPERLATIVE` is not defined)
0 commit comments