bahasa-simpl 1.0.14 → 1.0.15

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/LICENSE.md ADDED
@@ -0,0 +1,7 @@
1
+ Copyright 2026 faeiz-ff
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
4
+
5
+ The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
6
+
7
+ THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
package/README.md CHANGED
@@ -1,10 +1,10 @@
1
-
2
-
3
1
  # `simpl`: Indonesian Mini Programming Language
4
2
  `simpl` adalah bahasa pemrograman mini yang berbasis dari bahasa Indonesia. Bahasa ini dirancang untuk memudahkan penerjemahan berbagai konsep pemrograman ke dalam bahasa Indonesia. Selain itu, semua kata kunci (_keywords_) dari bahasa ini memiliki jumlah karakter persis 5 huruf untuk alasan estetika :)
5
3
 
6
4
  `simpl` adalah akronim rekursif dari `simpl`: Indonesian Mini Programming Language
7
5
 
6
+ Coba sekarang dalam website [simpl](https://bahasa-simpl.pages.dev)!
7
+
8
8
  ## Fitur `simpl`
9
9
  `simpl` **masih dalam tahap pengembangan!** Jadi, semua yang tertera disini akan berubah sewaktu-waktu!
10
10
 
@@ -17,16 +17,48 @@ Berikut fitur yang _sekarang_ sudah diimplementasikan:
17
17
 
18
18
  Fitur yang akan datang:
19
19
  - dokumentasi penuh
20
- - Pembersihan dan perapihan kode sumber :')
20
+ - Pembersihan dan perapihan kode sumber
21
21
  - Pengecekan sebelum eksekusi (Analisa semantik)
22
22
  - Pe`masuk`an input ke program
23
23
  - Pengendalian `error`
24
24
  - `impor` dan `expor`
25
25
  - bytecode...
26
- - dan fitur lainnya yang tidak terpikirkan sekarang :)
26
+ - dan fitur lainnya yang tidak terpikirkan sekarang
27
+
28
+ ## Instalasi
29
+
30
+ Saat ini CLI belum didukung.
31
+
32
+ ```
33
+ npm install bahasa-simpl
34
+ ```
35
+
36
+ lalu pada suatu index.js dalam folder yang sama:
37
+
38
+ ```js
39
+ import { Simpl } from "bahasa-simpl";
40
+
41
+ let s = new Simpl();
42
+
43
+ console.log(s.runCode(`
44
+
45
+ cetak "Halo Dunia!"
46
+
47
+ `));
48
+ ```
49
+
50
+ ## API
51
+
52
+ `class Simpl(opts?: { keepMemory?: boolean })`:
53
+ - Menghasilkan sebuah instance dari simpl
54
+ - `keepMemory?: boolean` default `false`:
55
+ - Kalau bernilai `true`, `simpl` akan menyimpan memorinya setiap kali `runCode`, Mengingatnya kembali saat `runCode` selanjutnya.
56
+
57
+ - `runCode(code: string): string`:
58
+ - Menjalankan `simpl` dan mencetak output programnya ke layar.
27
59
 
28
60
  ## Contoh `simpl`
29
- Tur lebih lengkap ada dalam [Tur Sintaks Simpl](docs/tur.md)
61
+ Tur lebih lengkap ada dalam [Tur Sintaks Simpl](https://github.com/faeiz-ff/simpl/blob/main/docs/tur.md)
30
62
  - `mesin` akar dua
31
63
  ```simpl
32
64
  mesin akar2 ==> (angka n) {
package/dist/simpl.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  declare module "bahasa-simpl" {
2
2
  export class Simpl {
3
- constructor(opts: {
3
+ constructor(opts?: {
4
4
  keepMemory?: boolean,
5
5
  });
6
6
  runCode(code: string): string;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "bahasa-simpl",
3
- "version": "1.0.14",
4
- "description": "Simpl: Indonesian Mini Programming Language interpreter",
3
+ "version": "1.0.15",
4
+ "description": "Bahasa pemrograman mini berbasis kata bahasa Indonesia",
5
5
  "exports": {
6
6
  ".": {
7
7
  "types": "./dist/simpl.d.ts",
@@ -31,8 +31,5 @@
31
31
  "homepage": "https://github.com/faeiz-ff/simpl#readme",
32
32
  "devDependencies": {
33
33
  "rollup": "^4.55.1"
34
- },
35
- "dependencies": {
36
- "bahasa-simpl": "^1.0.3"
37
34
  }
38
35
  }