-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Replace 'type(X)' with 'matching(X)' in the interpreter
Closes #5 GitHub issue (as far as the interpreter is concerned) Note that the 'type' syntactic sugar is not implemented in this commit.
- Loading branch information
Showing
6 changed files
with
10 additions
and
10 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
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,4 +1,4 @@ | ||
complex is type((re:real, im:real)) | ||
complex is matching((re:real, im:real)) | ||
Z1:complex + Z2:complex as complex is (Z1.re + Z2.re, Z1.im + Z2.im) | ||
|
||
(3,4) + (5, 6) |
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 +1 @@ | ||
type (complex (re:real, im:real)) (8.0, 10.0) | ||
matching (complex (re:real, im:real)) (8.0, 10.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 |
---|---|---|
@@ -1,5 +1,5 @@ | ||
// FILTER=sed -e 's/) )/))/g' | ||
complex is type(complex(re:real, im:real)) | ||
complex is matching(complex(re:real, im:real)) | ||
Z1:complex + Z2:complex as complex is complex(Z1.re + Z2.re, Z1.im + Z2.im) | ||
|
||
(complex(3,4) + complex(5, 6)) |
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