summaryrefslogtreecommitdiff
path: root/src/interpreter/SymbolTable.ts
diff options
context:
space:
mode:
authorElizabeth Hunt <elizabeth@simponic.xyz>2025-03-06 08:44:43 -0700
committerElizabeth Hunt <elizabeth@simponic.xyz>2025-03-06 08:44:43 -0700
commit958134419d7913dc7dda0d4cd1982c51d8bd1a23 (patch)
treed06b7f84be8d43db63e360efedf467fe3d803217 /src/interpreter/SymbolTable.ts
parent78797aa175651d53df21d3f8d5c51a55649aaced (diff)
downloadthe-abstraction-engine-church-numerals.tar.gz
the-abstraction-engine-church-numerals.zip
checkpointchurch-numerals
Diffstat (limited to 'src/interpreter/SymbolTable.ts')
-rw-r--r--src/interpreter/SymbolTable.ts6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/interpreter/SymbolTable.ts b/src/interpreter/SymbolTable.ts
index e2ff7e1..df88d8f 100644
--- a/src/interpreter/SymbolTable.ts
+++ b/src/interpreter/SymbolTable.ts
@@ -46,4 +46,10 @@ export class SymbolTable {
public createChild(): SymbolTable {
return new SymbolTable(this);
}
+
+ public static from(collection: Array<string> | Set<string>): SymbolTable {
+ const table = new SymbolTable();
+ collection.forEach((symbol) => table.add(symbol));
+ return table;
+ }
}