File tree Expand file tree Collapse file tree 3 files changed +23
-4
lines changed Expand file tree Collapse file tree 3 files changed +23
-4
lines changed Original file line number Diff line number Diff line change @@ -11,11 +11,30 @@ GoScript is a lightweight scripting language implemented in Go. It provides a si
11
11
- ** Modular Design:** Easily extend or integrate new features thanks to the well-organized code structure.
12
12
- ** Cross-Platform:** Built in Go, GoScript can run on any platform that supports Go.
13
13
14
+ ## Syntax
15
+
16
+ ** Hello World:**
17
+
18
+ ```
19
+ print("Hey World!")
20
+ ```
21
+
22
+ ** Fibonacci:**
23
+
24
+ ```
25
+ fn f(n) {
26
+ if n <= 1 { 1 }
27
+ n * f(n-1)
28
+ }
29
+
30
+ println(f(5))
31
+ ```
32
+
14
33
## Getting Started
15
34
16
35
### Prerequisites
17
36
18
- - [ Go] ( https://golang.org/dl/ ) 1.XX or later
37
+ - [ Go] ( https://golang.org/dl/ ) Tested on 1.22.4
19
38
20
39
### Installation
21
40
@@ -65,7 +84,7 @@ GoScript/
65
84
├── goscript.exe # Compiled executable (Windows)
66
85
├── lexer.go # Lexer: Tokenizes the source code
67
86
├── LICENSE # MIT License file
68
- ├── main .go # Entry point of the interpreter
87
+ ├── goscript .go # Entry point of the interpreter
69
88
└── parser.go # Parser: Builds the AST from tokens
70
89
```
71
90
@@ -85,4 +104,4 @@ This project is licensed under the MIT License. See the LICENSE file for details
85
104
86
105
## Copyright
87
106
88
- © 2025 Max Base
107
+ © 2025 Max Base (Seyyed Ali Mohammadiyeh)
File renamed without changes.
Original file line number Diff line number Diff line change 1
- print("hey ")
1
+ print("Hey World! ")
You can’t perform that action at this time.
0 commit comments