basic functionality, no generics
This commit is contained in:
commit
a8260f2afb
17 changed files with 615 additions and 0 deletions
30
lib/literals.js
Normal file
30
lib/literals.js
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
import {Int, Bool, Double} from "../primitives/symbols.js";
|
||||
import { getListType, makeListModule } from "../structures/list_common.js";
|
||||
|
||||
const ListOfBool = getListType(Bool);
|
||||
const ListOfBoolModule = makeListModule(Bool);
|
||||
|
||||
const ListOfInt = getListType(Int);
|
||||
const ListOfIntModule = makeListModule(Int);
|
||||
|
||||
const ListOfListOfInt = getListType(ListOfInt);
|
||||
const ListOfListOfIntModule = makeListModule(ListOfInt);
|
||||
|
||||
export const ModuleLiterals = [
|
||||
{i: 0n, t: Int},
|
||||
{i: 42n, t: Int},
|
||||
{i: false, t: Bool},
|
||||
{i: 3.14159265359, t: Double},
|
||||
|
||||
{i: {l:[42n, 43n]}, t: ListOfInt},
|
||||
|
||||
// {i: [[42n, 43n]], t: ListOfListOfInt},
|
||||
|
||||
// i'm lazy
|
||||
...ListOfIntModule,
|
||||
|
||||
|
||||
// ...ListOfBoolModule,
|
||||
|
||||
// ...ListOfListOfIntModule,
|
||||
];
|
||||
Loading…
Add table
Add a link
Reference in a new issue