https://github.com/doubledotstudios/linkage
A next generation programming language that allows you to draw elements from other languages.
https://github.com/doubledotstudios/linkage
Last synced: 29 days ago
JSON representation
A next generation programming language that allows you to draw elements from other languages.
- Host: GitHub
- URL: https://github.com/doubledotstudios/linkage
- Owner: DoubleDotStudios
- Created: 2024-09-06T07:56:38.000Z (9 months ago)
- Default Branch: main
- Last Pushed: 2025-02-14T13:14:18.000Z (4 months ago)
- Last Synced: 2025-03-31T16:11:12.003Z (2 months ago)
- Language: C
- Homepage:
- Size: 3.88 MB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Linkage
> [!NOTE]
> You are on the `main` C branch.
> For the Rust rewrite see the [`rust`](https://github.com/DoubleDotStudios/linkage/tree/rust) branch.Linkage is a next generation programming language that allows for the use of other languages' features.
It has easy to use syntax and a simple compiler.---
## Compilation
Compilation using Linkage is simple.
```console
llsc file/to/compile.lk
```Then the compiled file can be run.
```console
./executable_name
```## Syntax
Linkage's syntax is as follows:
### The Main Function
```
# main.lkfn main (argc: num, argv: arr): int {
return argc # argc can be replaced with other integers
}
```### Variables
```
;foo = 32 # variable
;;bar = 16 # constant;baz: str = "Hello, World!" # typed variable
;;buz: arr = [1, 2, 3] # typed constant
```### Reassignment
```
foo = bar
foo += 2 # foo = foo + 2
foo *= 3 # foo = foo * 3
foo /= 3 # foo = foo / 3
foo -= 2 # foo = foo - 2
foo ^= 2 # foo = foo ^ 2
foo `= 2 # foo = foo ` 2
```### Binary Operations
```
foo + bar # + operator used for addition
foo - bar # - operator used for subtraction
foo / bar # / operator used for division
foo * bar # * operator used for multiplication
foo ^ bar # ^ operator used for powers
foo ` bar # ` operator used for roots
```### Unary Operators
```
-foo # negative foo
foo-- # decrement foo
foo++ # increment foo
foo^^ # square foo
foo`` # square root foo
```