This repository has been archived by the owner on Mar 10, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support for running outside of GOPATH and include some binaries for L…
…inux and Windows
- Loading branch information
1 parent
af3b185
commit f23f73a
Showing
7 changed files
with
61 additions
and
11 deletions.
There are no files selected for viewing
Binary file not shown.
Binary file not shown.
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 |
---|---|---|
@@ -0,0 +1,15 @@ | ||
namespace examples/main | ||
import elara/std | ||
|
||
struct Test { | ||
String name | ||
} | ||
|
||
extend Test { | ||
let b = 3 | ||
let print-name => print(name) | ||
} | ||
|
||
let test = Test("Test Struct") | ||
test.print-name() | ||
print(test.b) |
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 |
---|---|---|
@@ -0,0 +1,9 @@ | ||
namespace elara/std | ||
|
||
let print = (Any msg) => Unit { | ||
print-raw(msg + "\n") | ||
} | ||
|
||
let print-raw = (Any msg) => { | ||
stdout.write(msg) | ||
} |
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 |
---|---|---|
@@ -0,0 +1,14 @@ | ||
echo 'Cleaning Up...' | ||
rm -rf bin/ | ||
mkdir bin | ||
echo 'Moving Standard Library...' | ||
cp -r stdlib bin/ | ||
cp elara.el bin/ | ||
|
||
echo 'Building Windows amd64...' | ||
env GOOS=linux GOARCH=amd64 go build -o bin/elara-linux-amd64 | ||
|
||
echo 'Building Linux amd64...' | ||
env GOOS=windows GOARCH=amd64 go build -o bin/elara-windows-amd64.exe | ||
|
||
echo 'Done!' |
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,6 +1,5 @@ | ||
package parser | ||
|
||
import "C" | ||
import ( | ||
"fmt" | ||
"github.com/ElaraLang/elara/lexer" | ||
|