forked from SalamLang/Salam
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add more hooks; Fix mixed line endings to lf (SalamLang#75)
- Loading branch information
Showing
24 changed files
with
4,966 additions
and
4,961 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,14 @@ | ||
salam | ||
s.exe | ||
s | ||
*.bin | ||
*.exe | ||
|
||
*.js | ||
*.wasm | ||
|
||
.vscode/** | ||
.vscode/* | ||
|
||
.idea | ||
.idea/* | ||
salam | ||
s.exe | ||
s | ||
*.bin | ||
*.exe | ||
|
||
*.js | ||
*.wasm | ||
|
||
.vscode/** | ||
.vscode/* | ||
|
||
.idea | ||
.idea/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,18 @@ | ||
# Salam Programming Language | ||
|
||
Salam Language, inspired by the Persian and Arabic roots of the word "salam," which means "peace," is a programming language crafted for simplicity and accessibility within the Iranian and Arabic-speaking communities. Serving as the first Persian and Arabic programming language, Salam Language is designed to provide an intuitive and user-friendly experience, specifically tailored for users, students, and developers familiar with Persian or Arabic. Embracing the cultural and linguistic richness of the region, Salam Language aims to empower a diverse range of individuals, making programming more approachable and fostering a sense of ease and collaboration in the local coding community. | ||
|
||
``` | ||
$ ./salam | ||
Welcome to Salam Programming Language! | ||
Salam is the first Persian/Iranian computer scripting language. | ||
Usage: | ||
salam <filename> # Execute a Salam script | ||
Example: | ||
salam my_script.salam # Run the Salam script 'my_script.salam' | ||
Feel free to explore and create using Salam! | ||
For more information, visit: https://salamlang.ir | ||
``` | ||
# Salam Programming Language | ||
|
||
Salam Language, inspired by the Persian and Arabic roots of the word "salam," which means "peace," is a programming language crafted for simplicity and accessibility within the Iranian and Arabic-speaking communities. Serving as the first Persian and Arabic programming language, Salam Language is designed to provide an intuitive and user-friendly experience, specifically tailored for users, students, and developers familiar with Persian or Arabic. Embracing the cultural and linguistic richness of the region, Salam Language aims to empower a diverse range of individuals, making programming more approachable and fostering a sense of ease and collaboration in the local coding community. | ||
|
||
``` | ||
$ ./salam | ||
Welcome to Salam Programming Language! | ||
Salam is the first Persian/Iranian computer scripting language. | ||
Usage: | ||
salam <filename> # Execute a Salam script | ||
Example: | ||
salam my_script.salam # Run the Salam script 'my_script.salam' | ||
Feel free to explore and create using Salam! | ||
For more information, visit: https://salamlang.ir | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,72 +1,72 @@ | ||
# Salam Programming Language Documentation | ||
|
||
## Information | ||
|
||
### Name | ||
|
||
`Salam` or `Sallam` or `Salaam` | ||
|
||
### Website | ||
|
||
<https://salamlang.ir> | ||
|
||
## Keywords | ||
|
||
``` | ||
AND | و | ||
BREAK | توقف | ||
CONTINUE | ادامه | ||
ELSEIF | واگرنه | ||
FALSE | غلط | ||
FUNCTION | عملکرد | ||
IF | اگر | ||
NULL | پوچ | ||
OR | یا | ||
PRINT | نمایش | ||
RETURN | برگشت | ||
TRUE | درست | ||
UNTIL | تا | ||
``` | ||
|
||
## Operators | ||
|
||
``` | ||
و AND | ||
یا OR | ||
= | ||
== | ||
!= | ||
> | ||
< | ||
>= | ||
<= | ||
+ | ||
- | ||
* | ||
/ | ||
``` | ||
|
||
## Syntax | ||
|
||
TODO | ||
|
||
## Help | ||
|
||
``` | ||
$ ./salam | ||
Welcome to Salam Programming Language! | ||
Salam is the first Persian/Iranian computer scripting language. | ||
Usage: | ||
salam <filename> # Execute a Salam script | ||
Example: | ||
salam my_script.salam # Run the Salam script 'my_script.salam' | ||
Feel free to explore and create using Salam! | ||
For more information, visit: https://salamlang.ir | ||
``` | ||
|
||
### Copyright | ||
|
||
2024 | ||
# Salam Programming Language Documentation | ||
|
||
## Information | ||
|
||
### Name | ||
|
||
`Salam` or `Sallam` or `Salaam` | ||
|
||
### Website | ||
|
||
<https://salamlang.ir> | ||
|
||
## Keywords | ||
|
||
``` | ||
AND | و | ||
BREAK | توقف | ||
CONTINUE | ادامه | ||
ELSEIF | واگرنه | ||
FALSE | غلط | ||
FUNCTION | عملکرد | ||
IF | اگر | ||
NULL | پوچ | ||
OR | یا | ||
PRINT | نمایش | ||
RETURN | برگشت | ||
TRUE | درست | ||
UNTIL | تا | ||
``` | ||
|
||
## Operators | ||
|
||
``` | ||
و AND | ||
یا OR | ||
= | ||
== | ||
!= | ||
> | ||
< | ||
>= | ||
<= | ||
+ | ||
- | ||
* | ||
/ | ||
``` | ||
|
||
## Syntax | ||
|
||
TODO | ||
|
||
## Help | ||
|
||
``` | ||
$ ./salam | ||
Welcome to Salam Programming Language! | ||
Salam is the first Persian/Iranian computer scripting language. | ||
Usage: | ||
salam <filename> # Execute a Salam script | ||
Example: | ||
salam my_script.salam # Run the Salam script 'my_script.salam' | ||
Feel free to explore and create using Salam! | ||
For more information, visit: https://salamlang.ir | ||
``` | ||
|
||
### Copyright | ||
|
||
2024 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
# زبان برنامه نویسی سلام - مستندات (عربی شود) | ||
# زبان برنامه نویسی سلام - مستندات (عربی شود) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
# زبان برنامه نویسی سلام - مستندات | ||
# زبان برنامه نویسی سلام - مستندات |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,15 @@ | ||
/* | ||
به نام خدا | ||
سلام چطوری | ||
*/ | ||
/* | ||
اگر شما یک طراح هستین و یا با طراحی های گرافیکی سروکار دارید به متن های برخورده اید که با نام لورم ایپسوم شناخته میشوند. لورم ایپسوم یا طرحنما (به انگلیسی: Lorem ipsum) متنی ساختگی و بدون معنی است که برای امتحان فونت و یا پر کردن فضا در یک طراحی گرافیکی و یا صنعت چاپ استفاده میشود. طراحان وب و گرافیک از این متن برای پرکردن صفحه و ارائه شکل کلی طرح استفاده میکنند. | ||
طراحان سایت هنگام طراحی قالب سایت معمولا با این موضوع رو برو هستند که محتوای اصلی صفحات آماده نیست. در نتیجه طرح کلی دید درستی به کار فرما نمیدهد. اگر طراح بخواهد دنبال متن های مرتبط بگردد تمرکزش از روی کار اصلی برداشته میشود و اینکار زمان بر خواهد بود. همچنین طراح به دنبال این است که پس از ارایه کار نظر دیگران را در مورد طراحی جویا شود و نمیخواهد افراد روی متن های موجود تمرکز کنند. | ||
از آنجا که لورم ایپسوم، شباهت زیادی به متن های واقعی دارد، طراحان معمولا از لورم ایپسوم استفاده میکنند تا فقط به مشتری یا کار فرما نشان دهند که قالب طراحی شده بعد از اینکه متن در آن قرار میگرد چگونه خواهد بود و فونت ها و اندازه ها چگونه در نظر گرفته شده است. | ||
نکته بعدی در مورد متن ساختگی لورم ایپسوم این است که بعضی از طراحان وبسایت و گرافیست کاران بعد از آنکه قالب و محتوای مورد نظرشون را ایجاد کردند از یاد میبرند که متن لورم را از قسمتهای مختلف سایت حذف کنند و یا با متن دیگری جایگزین کنند. به همین دلیل اغلب اوقات ما با وبسایتهایی مواجه میشویم که در گوشه و کنار صفحات آنها متن لورم ایپسوم هنوز وجود دارد و حذف نشده است که این نشان دهنده بی توجهی طراحان است. | ||
/* | ||
به نام خدا | ||
سلام چطوری | ||
*/ | ||
|
||
/* | ||
اگر شما یک طراح هستین و یا با طراحی های گرافیکی سروکار دارید به متن های برخورده اید که با نام لورم ایپسوم شناخته میشوند. لورم ایپسوم یا طرحنما (به انگلیسی: Lorem ipsum) متنی ساختگی و بدون معنی است که برای امتحان فونت و یا پر کردن فضا در یک طراحی گرافیکی و یا صنعت چاپ استفاده میشود. طراحان وب و گرافیک از این متن برای پرکردن صفحه و ارائه شکل کلی طرح استفاده میکنند. | ||
|
||
طراحان سایت هنگام طراحی قالب سایت معمولا با این موضوع رو برو هستند که محتوای اصلی صفحات آماده نیست. در نتیجه طرح کلی دید درستی به کار فرما نمیدهد. اگر طراح بخواهد دنبال متن های مرتبط بگردد تمرکزش از روی کار اصلی برداشته میشود و اینکار زمان بر خواهد بود. همچنین طراح به دنبال این است که پس از ارایه کار نظر دیگران را در مورد طراحی جویا شود و نمیخواهد افراد روی متن های موجود تمرکز کنند. | ||
|
||
از آنجا که لورم ایپسوم، شباهت زیادی به متن های واقعی دارد، طراحان معمولا از لورم ایپسوم استفاده میکنند تا فقط به مشتری یا کار فرما نشان دهند که قالب طراحی شده بعد از اینکه متن در آن قرار میگرد چگونه خواهد بود و فونت ها و اندازه ها چگونه در نظر گرفته شده است. | ||
|
||
نکته بعدی در مورد متن ساختگی لورم ایپسوم این است که بعضی از طراحان وبسایت و گرافیست کاران بعد از آنکه قالب و محتوای مورد نظرشون را ایجاد کردند از یاد میبرند که متن لورم را از قسمتهای مختلف سایت حذف کنند و یا با متن دیگری جایگزین کنند. به همین دلیل اغلب اوقات ما با وبسایتهایی مواجه میشویم که در گوشه و کنار صفحات آنها متن لورم ایپسوم هنوز وجود دارد و حذف نشده است که این نشان دهنده بی توجهی طراحان است. | ||
|
||
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
// به نام خدا | ||
// سلام | ||
// به نام خدا | ||
// سلام | ||
// چطوری؟ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,18 @@ | ||
عملکرد فاکتوریل(عدد) { | ||
نتیجه = ۱ | ||
اندیس = ۱ | ||
تا اندیس != عدد + ۱ { | ||
نتیجه = نتیجه * اندیس | ||
اندیس = اندیس + ۱ | ||
} | ||
برگشت نتیجه | ||
} | ||
عملکرد سلام { | ||
نمایش فاکتوریل(5) | ||
عدد = ۱۰ | ||
نمایش فاکتوریل(عدد) | ||
} | ||
عملکرد فاکتوریل(عدد) { | ||
نتیجه = ۱ | ||
اندیس = ۱ | ||
|
||
تا اندیس != عدد + ۱ { | ||
نتیجه = نتیجه * اندیس | ||
اندیس = اندیس + ۱ | ||
} | ||
|
||
برگشت نتیجه | ||
} | ||
|
||
عملکرد سلام { | ||
نمایش فاکتوریل(5) | ||
|
||
عدد = ۱۰ | ||
نمایش فاکتوریل(عدد) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,32 @@ | ||
عملکرد فاکتوریل(عدد) { | ||
اگر عدد == ۰ { | ||
برگشت ۱ | ||
} | ||
برگشت عدد * فاکتوریل(عدد - ۱) | ||
} | ||
عملکرد تست() { | ||
عدد = ۱۰ | ||
نمایش عدد | ||
نتیجه = فاکتوریل(عدد) | ||
نمایش عدد | ||
نمایش نتیجه | ||
نمایش عدد | ||
نمایش عدد + "!" | ||
نمایش "!" + عدد | ||
نمایش "فاکتوریل از " + عدد + " برابر با " + نتیجه | ||
} | ||
عملکرد سلام { | ||
عدد = ۵ | ||
نمایش فاکتوریل(عدد) | ||
تست() | ||
} | ||
عملکرد فاکتوریل(عدد) { | ||
اگر عدد == ۰ { | ||
برگشت ۱ | ||
} | ||
برگشت عدد * فاکتوریل(عدد - ۱) | ||
} | ||
|
||
عملکرد تست() { | ||
عدد = ۱۰ | ||
|
||
نمایش عدد | ||
|
||
نتیجه = فاکتوریل(عدد) | ||
|
||
نمایش عدد | ||
|
||
نمایش نتیجه | ||
|
||
نمایش عدد | ||
نمایش عدد + "!" | ||
نمایش "!" + عدد | ||
|
||
نمایش "فاکتوریل از " + عدد + " برابر با " + نتیجه | ||
|
||
} | ||
|
||
عملکرد سلام { | ||
عدد = ۵ | ||
نمایش فاکتوریل(عدد) | ||
|
||
تست() | ||
} |
Oops, something went wrong.