Skip to content

Commit 740bf59

Browse files
committed
up
1 parent 5b85327 commit 740bf59

File tree

3 files changed

+23
-4
lines changed

3 files changed

+23
-4
lines changed

README.md

Lines changed: 22 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,30 @@ GoScript is a lightweight scripting language implemented in Go. It provides a si
1111
- **Modular Design:** Easily extend or integrate new features thanks to the well-organized code structure.
1212
- **Cross-Platform:** Built in Go, GoScript can run on any platform that supports Go.
1313

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+
1433
## Getting Started
1534

1635
### Prerequisites
1736

18-
- [Go](https://golang.org/dl/) 1.XX or later
37+
- [Go](https://golang.org/dl/) Tested on 1.22.4
1938

2039
### Installation
2140

@@ -65,7 +84,7 @@ GoScript/
6584
├── goscript.exe # Compiled executable (Windows)
6685
├── lexer.go # Lexer: Tokenizes the source code
6786
├── LICENSE # MIT License file
68-
├── main.go # Entry point of the interpreter
87+
├── goscript.go # Entry point of the interpreter
6988
└── parser.go # Parser: Builds the AST from tokens
7089
```
7190

@@ -85,4 +104,4 @@ This project is licensed under the MIT License. See the LICENSE file for details
85104

86105
## Copyright
87106

88-
© 2025 Max Base
107+
© 2025 Max Base (Seyyed Ali Mohammadiyeh)
File renamed without changes.

examples/hello.gos

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
print("hey")
1+
print("Hey World!")

0 commit comments

Comments
 (0)