-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[compiler/parse] Accept programs that combine entrypoint and export
- Loading branch information
Showing
8 changed files
with
82 additions
and
3 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
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,11 @@ | ||
# This is free and unencumbered software released into the public domain. | ||
# See ../LICENSE.unlicense | ||
|
||
[entrypoint_2] | ||
type = program | ||
modules = [Entrypoint2a, Entrypoint2b] | ||
|
||
[entrypoint_3] | ||
type = program | ||
modules = [Entrypoint3a, Entrypoint3b] | ||
|
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 @@ | ||
Test 2 |
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 @@ | ||
/* | ||
* vim: ft=plasma | ||
* This is free and unencumbered software released into the public domain. | ||
* See ../LICENSE.unlicense | ||
*/ | ||
|
||
module Entrypoint2a | ||
|
||
export entrypoint | ||
func test2a() uses IO -> Int { | ||
print!("Test 2\n") | ||
|
||
return 0 | ||
} | ||
|
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 @@ | ||
/* | ||
* vim: ft=plasma | ||
* This is free and unencumbered software released into the public domain. | ||
* See ../LICENSE.unlicense | ||
*/ | ||
|
||
module Entrypoint2b | ||
|
||
import Entrypoint2a as T2a | ||
|
||
func test2b() uses IO -> Int { | ||
return T2a.test2a!() | ||
} | ||
|
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 @@ | ||
Test 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 |
---|---|---|
@@ -0,0 +1,16 @@ | ||
/* | ||
* vim: ft=plasma | ||
* This is free and unencumbered software released into the public domain. | ||
* See ../LICENSE.unlicense | ||
*/ | ||
|
||
module Entrypoint3a | ||
|
||
// entrypoint2 has the keywords in the opposite order. | ||
entrypoint export | ||
func test3a() uses IO -> Int { | ||
print!("Test 3\n") | ||
|
||
return 0 | ||
} | ||
|
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 @@ | ||
/* | ||
* vim: ft=plasma | ||
* This is free and unencumbered software released into the public domain. | ||
* See ../LICENSE.unlicense | ||
*/ | ||
|
||
module Entrypoint3b | ||
|
||
import Entrypoint3a as T3a | ||
|
||
func test3b() uses IO -> Int { | ||
return T3a.test3a!() | ||
} | ||
|