Skip to content

Commit 58d9950

Browse files
committed
Remove gitbook from repo.
Add library support.
1 parent f6bbfd5 commit 58d9950

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+339
-2677
lines changed

README.md

Lines changed: 44 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
---
2-
description: A short introduction to ByteSkript, its uses, goals and applications.
3-
coverY: 0
2+
description: A short introduction to ByteSkript, its uses, goals and applications. coverY: 0
43
---
54

65
# 🎶 Introduction to ByteSkript
@@ -13,14 +12,16 @@ An experimental language based on Skript (with no pre-eminent DSL dependencies)
1312

1413
### Visit the [documentation](https://moderocky.gitbook.io/byteskript/) and wiki [here](https://moderocky.gitbook.io/byteskript/).
1514

16-
ByteSkript draws heavily from the original [Skript](https://github.com/SkriptLang/Skript/) language design, with some minor structural adaptations to strengthen the language grammar, to remove some unnecessary jargon and make the language more reliable. ByteSkript also increases interoperability with existing JVM languages.
15+
ByteSkript draws heavily from the original [Skript](https://github.com/SkriptLang/Skript/) language design, with some
16+
minor structural adaptations to strengthen the language grammar, to remove some unnecessary jargon and make the language
17+
more reliable. ByteSkript also increases interoperability with existing JVM languages.
1718

1819
{% hint style="info" %}
1920
**ByteSkript is not affiliated with** [**SkriptLang**](https://github.com/SkriptLang/Skript/)**.**\
20-
ByteSkript is a completely **new** implementation of the general guide and style of the 'Skript' language, with its own language specification, goals and licence.
21+
ByteSkript is a completely **new** implementation of the general guide and style of the 'Skript' language, with its own
22+
language specification, goals and licence.
2123

22-
For clarity: SkriptLang's Skript implementation will be referred to as 'original' or 'minecraft' Skript.
23-
{% endhint %}
24+
For clarity: SkriptLang's Skript implementation will be referred to as 'original' or 'minecraft' Skript. {% endhint %}
2425

2526
### Goals
2627

@@ -44,7 +45,9 @@ For clarity: SkriptLang's Skript implementation will be referred to as 'original
4445
The layout, look, readability and core language components should keep parity with original Skript.\
4546
Some small changes will be made to improve readability and compile accuracy.
4647

47-
Skript is designed to be beginner-friendly. Ideally, a user with no experience should be able to read Skript code and understand its function. All instructions are written in basic English, avoiding niche programming terms and symbols wherever possible.
48+
Skript is designed to be beginner-friendly. Ideally, a user with no experience should be able to read Skript code and
49+
understand its function. All instructions are written in basic English, avoiding niche programming terms and symbols
50+
wherever possible.
4851

4952
## Using ByteSkript
5053

@@ -62,68 +65,76 @@ Running these for the first time will create special folders in the run director
6265

6366
This is the simplest resource, used for loading (and running) user-created script files.
6467

65-
Raw script files can be written and placed in the `skript/` folder. All scripts will be loaded internally, but no classes or jar files will be written.
68+
Raw script files can be written and placed in the `skript/` folder. All scripts will be loaded internally, but no
69+
classes or jar files will be written.
6670

6771
The `on [script] load` event will be triggered for each script as an entry point.
6872

69-
{% hint style="success" %}
70-
The ByteSkript compilers, language specification and compile-time API are available in this resource, so advanced scripts may use dynamic loading to load extra skript code written at runtime!
73+
{% hint style="success" %} The ByteSkript compilers, language specification and compile-time API are available in this
74+
resource, so advanced scripts may use dynamic loading to load extra skript code written at runtime!
7175
{% endhint %}
7276

7377
### SkriptClassCompiler
7478

75-
This resource is used for generating compiled JVM `.class` files for each script in the `skript/` folder. The classes produced by this are not directly executable, but may be useful for sharing and special loading.
79+
This resource is used for generating compiled JVM `.class` files for each script in the `skript/` folder. The classes
80+
produced by this are not directly executable, but may be useful for sharing and special loading.
7681

7782
The compiled scripts will **not** be loaded or run.
7883

7984
### SkriptJarBuilder
8085

81-
This resource builds an executable jar containing all of the user-created scripts, resources and the ByteSkript runtime (`skript` namespace and functions.)
86+
This resource builds an executable jar containing all of the user-created scripts, resources and the ByteSkript
87+
runtime (`skript` namespace and functions.)
8288

8389
\
84-
This output jar can be run with `java -jar JarName.jar` and is distributable - it does not need anything as a dependency.
90+
This output jar can be run with `java -jar JarName.jar` and is distributable - it does not need anything as a
91+
dependency.
8592

86-
When executing this jar, all scripts will be loaded and the `on [script] load` event will be triggered for each script as an entry point.
93+
When executing this jar, all scripts will be loaded and the `on [script] load` event will be triggered for each script
94+
as an entry point.
8795

88-
{% hint style="danger" %}
89-
The ByteSkript standard compiler and compile-time API are **not** added to the output jar.
90-
{% endhint %}
96+
{% hint style="danger" %} The ByteSkript standard compiler and compile-time API are **not** added to the output jar. {%
97+
endhint %}
9198

92-
{% hint style="success" %}
93-
The dynamic function on-the-fly compiler **is** available in this jar, so dynamic function calls are available.
94-
{% endhint %}
99+
{% hint style="success" %} The dynamic function on-the-fly compiler **is** available in this jar, so dynamic function
100+
calls are available. {% endhint %}
95101

96102
## Language Libraries
97103

98-
Due to its fixed nature, the Skript language has always relied on third-party add-ons to add new syntax and functionality for specific areas.
104+
Due to its fixed nature, the Skript language has always relied on third-party add-ons to add new syntax and
105+
functionality for specific areas.
99106

100107
ByteSkript achieves this through libraries, which can register compile-time and run-time functionality.
101108

102-
There are two provided syntax APIs, labelled `v1` and `v2`. Both are available and easily accessible, but may be suited to different tasks.
109+
There are two provided syntax APIs, labelled `v1` and `v2`. Both are available and easily accessible, but may be suited
110+
to different tasks.
103111

104-
Within the set of built-in functions in the `skript` namespace are some for accessing JVM resources which can be used to build more advanced functionality.
112+
Within the set of built-in functions in the `skript` namespace are some for accessing JVM resources which can be used to
113+
build more advanced functionality.
105114

106115
### API v1
107116

108-
The `v1` syntax API offers complete control of syntax, including writing bytecode instructions, look-aheads, additions, etc.
117+
The `v1` syntax API offers complete control of syntax, including writing bytecode instructions, look-aheads, additions,
118+
etc.
109119

110-
However, it also requires creating and individually registering (fairly complex) classes to add new syntax and language structures.
120+
However, it also requires creating and individually registering (fairly complex) classes to add new syntax and language
121+
structures.
111122

112-
This is the most powerful syntax API, as it allows control of the result code at the VM-bytecode level for experienced users. It is recommended for adding entirely new language structures or features with excessively-variable layouts.
123+
This is the most powerful syntax API, as it allows control of the result code at the VM-bytecode level for experienced
124+
users. It is recommended for adding entirely new language structures or features with excessively-variable layouts.
113125

114-
{% hint style="info" %}
115-
The implicit array creation syntax `(a, b, ...)` has to use the v1 API to create variable-size arrays.
116-
{% endhint %}
126+
{% hint style="info" %} The implicit array creation syntax `(a, b, ...)` has to use the v1 API to create variable-size
127+
arrays. {% endhint %}
117128

118129
### API v2
119130

120131
The `v2` syntax API is significantly easier to use, but offers much less control over syntax.
121132

122-
Syntax methods are given an annotation, and the class they belong to is registered to a library. This API is much more suitable for property syntax, where creating a class for each one would be excessive.
133+
Syntax methods are given an annotation, and the class they belong to is registered to a library. This API is much more
134+
suitable for property syntax, where creating a class for each one would be excessive.
123135

124-
{% hint style="info" %}
125-
The v2 API is used internally by all of the I/O handler syntax. A lot of these are also forced to extract or bridge.
126-
{% endhint %}
136+
{% hint style="info" %} The v2 API is used internally by all of the I/O handler syntax. A lot of these are also forced
137+
to extract or bridge. {% endhint %}
127138

128139
### Libraries Used
129140

SUMMARY.md

Lines changed: 0 additions & 30 deletions
This file was deleted.

namespaces/skript.md

Lines changed: 0 additions & 72 deletions
This file was deleted.

pom.xml

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
<properties>
1313
<maven.compiler.source>17</maven.compiler.source>
1414
<maven.compiler.target>17</maven.compiler.target>
15+
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
1516
</properties>
1617

1718
<build>
@@ -102,12 +103,6 @@
102103
<version>9.2</version>
103104
<scope>compile</scope>
104105
</dependency>
105-
<dependency>
106-
<groupId>mx.kenzie</groupId>
107-
<artifactId>glass</artifactId>
108-
<version>1.0.0</version>
109-
<scope>compile</scope>
110-
</dependency>
111106
<dependency>
112107
<groupId>mx.kenzie</groupId>
113108
<artifactId>mimic</artifactId>

0 commit comments

Comments
 (0)