30 lines
723 B
JavaScript
30 lines
723 B
JavaScript
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,
|
|
];
|