MCPcopy Create free account
hub / github.com/LambdaNote/support-ts-tapl / parseRec2

Function parseRec2

book/tiny-ts-parser.ts:1215–1237  ·  view source on GitHub ↗
(code: string)

Source from the content-addressed store, hash-verified

1213}
1214
1215export function parseRec2(code: string): TermForRec2 {
1216 return subsetSystem(
1217 parse(code),
1218 ["Boolean", "Number", "Func", "Object", "TaggedUnion", "Rec", "TypeVar"],
1219 [
1220 "true",
1221 "false",
1222 "if",
1223 "number",
1224 "add",
1225 "var",
1226 "func",
1227 "call",
1228 "seq",
1229 "const",
1230 "objectNew",
1231 "objectGet",
1232 "taggedUnionNew",
1233 "taggedUnionGet",
1234 "recFunc",
1235 ],
1236 );
1237}
1238
1239export function parsePoly(code: string): TermForPoly {
1240 return subsetSystem(

Callers 1

runFunction · 0.50

Calls 2

subsetSystemFunction · 0.70
parseFunction · 0.70

Tested by

no test coverage detected