-
-
Notifications
You must be signed in to change notification settings - Fork 50
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added support for literal syntax for various numeric units.
- Loading branch information
1 parent
1f2aee6
commit 4f0d129
Showing
16 changed files
with
393 additions
and
185 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
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
202 changes: 122 additions & 80 deletions
202
stdlib/source/library/lux/meta/compiler/language/lux/syntax.lux
Large diffs are not rendered by default.
Oops, something went wrong.
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
43 changes: 43 additions & 0 deletions
43
stdlib/source/library/lux/meta/compiler/target/jvm/constant/double.lux
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,43 @@ | ||
... This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. | ||
... If a copy of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/. | ||
|
||
(.using | ||
[library | ||
[lux (.except Double) | ||
[abstract | ||
[equivalence (.only Equivalence)]] | ||
[data | ||
["[0]" binary | ||
["[1]" \\injection (.only Injection)]]] | ||
[math | ||
["[0]" random (.only Random)] | ||
[number | ||
["[0]" decimal]]]]]) | ||
|
||
(every .public Double | ||
Decimal) | ||
|
||
(the .public equivalence | ||
(Equivalence Double) | ||
decimal.equivalence) | ||
|
||
(alias [=] | ||
..equivalence) | ||
|
||
(the .public as_binary | ||
(Injection Double) | ||
(|>> decimal.bits | ||
binary.bits_64)) | ||
|
||
(the .public positive_zero | ||
Double | ||
+0.0) | ||
|
||
(the .public negative_zero | ||
Double | ||
-0.0) | ||
|
||
(the .public random | ||
(Random Double) | ||
(|> random.decimal | ||
(random.only decimal.number?))) |
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
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
Oops, something went wrong.