NodeScript 1.0.0
See the version list below for details.
dotnet add package NodeScript --version 1.0.0
NuGet\Install-Package NodeScript -Version 1.0.0
<PackageReference Include="NodeScript" Version="1.0.0" />
<PackageVersion Include="NodeScript" Version="1.0.0" />
<PackageReference Include="NodeScript" />
paket add NodeScript --version 1.0.0
#r "nuget: NodeScript, 1.0.0"
#addin nuget:?package=NodeScript&version=1.0.0
#tool nuget:?package=NodeScript&version=1.0.0
NodeScript
NodeScript is a rudimentary programming language designed to function on 'nodes', intended for use in puzzle games. Find development details here
Nodes
- Input nodes will continuously attempt to send the next line. It has only one output.
- Regular nodes can take in one string at a time, process it and send it to a set number of outputs. Each node can store a single object in
mem
and has limited space for code. - Combiner nodes can merge 2 pipes into one. It offers no options to choose which string goes through first, picking whatever comes first.
- Output nodes will consume the lines sent to it, placing it in the output file.
Features
- Basic arithmetic and boolean logic
- Variables - All variables are global in scope
- Indexing
- Element_of:
v[i]
- Slice:
v[i:j]
- Element_of:
- Basic control flow (if-else)
- Native functions for things like:
- String manipulation
- Data conversion and parsing
- Dynamic typing between:
- string
- string[]
- int
- bool
Notably, there are NO loops within the scripting itself. No while. No for. Execution will occur line by line and will only start when a node receives an input string to be processed.
Syntax
Every line contains a single statement. All statements will start with a relevant keyword for the operation and end with a semicolon.
- SET: Sets a variable to a certain value. Variables do not need to be declared. Syntax:
SET <variable_name>, <expression>;
- PRINT: Sends a string to a specific output node, denoted by an index. Syntax:
PRINT <output_idx>, <expression>;
- RETURN: Ends the program (until the next input comes). Syntax:
RETURN;
- IF: Executes the following code if the given expression is true. Syntax
IF <expression>;
- ELSE: Executes the following code if the previous if statement was false. Syntax
ELSE;
- ENDIF: Marks the end of the IF clause. Either ends the IF code section or the ELSE code section. Only one is needed per IF/ELSE statement. Syntax
ENDIF;
There are no methods nor is there indexing. Several native functions are available to provide necessary functionality.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net8.0
- No dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Initial Release