amr-lang 1.0.6 → 1.0.7
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/README.md +4 -4
- package/package.json +1 -1
- package/src/lexer.ts +2 -2
package/README.md
CHANGED
|
@@ -84,8 +84,8 @@ make add(a, b) {
|
|
|
84
84
|
show add(10, 20)
|
|
85
85
|
|
|
86
86
|
# Arabic version
|
|
87
|
-
|
|
88
|
-
|
|
87
|
+
اعمل multiply(x, y) {
|
|
88
|
+
رجع x * y
|
|
89
89
|
}
|
|
90
90
|
```
|
|
91
91
|
|
|
@@ -147,8 +147,8 @@ show 10 # Inline comment
|
|
|
147
147
|
### Arabic Keywords (عربي)
|
|
148
148
|
- `خلي` - Variable declaration (let)
|
|
149
149
|
- `اطبع` - Print output (show)
|
|
150
|
-
-
|
|
151
|
-
-
|
|
150
|
+
- `اعمل` - Function declaration (make)
|
|
151
|
+
- `رجع` - Return from function (return)
|
|
152
152
|
- `اذا` - If statement (when)
|
|
153
153
|
- `والا` - Else statement (otherwise)
|
|
154
154
|
- `كرر` - While loop (loop)
|
package/package.json
CHANGED
package/src/lexer.ts
CHANGED
|
@@ -10,8 +10,8 @@ const keywords = ["let", "show", "make", "return", "when", "otherwise", "loop"];
|
|
|
10
10
|
const arabicKeywords: Record<string, string> = {
|
|
11
11
|
"خلي": "LET",
|
|
12
12
|
"اطبع": "SHOW",
|
|
13
|
-
"
|
|
14
|
-
"
|
|
13
|
+
"اعمل": "MAKE",
|
|
14
|
+
"رجع": "RETURN",
|
|
15
15
|
"اذا": "WHEN",
|
|
16
16
|
"والا": "OTHERWISE",
|
|
17
17
|
"كرر": "LOOP"
|