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

Function parseRec

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

Source from the content-addressed store, hash-verified

1191}
1192
1193export function parseRec(code: string): TermForRec {
1194 return subsetSystem(
1195 parse(code),
1196 ["Boolean", "Number", "Func", "Object", "Rec", "TypeVar"],
1197 [
1198 "true",
1199 "false",
1200 "if",
1201 "number",
1202 "add",
1203 "var",
1204 "func",
1205 "call",
1206 "seq",
1207 "const",
1208 "objectNew",
1209 "objectGet",
1210 "recFunc",
1211 ],
1212 );
1213}
1214
1215export function parseRec2(code: string): TermForRec2 {
1216 return subsetSystem(

Callers 1

runFunction · 0.50

Calls 2

subsetSystemFunction · 0.70
parseFunction · 0.70

Tested by

no test coverage detected