We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9fb1c84 commit 8ae2bf5Copy full SHA for 8ae2bf5
src/features/cseMachine/utils/altLangs.ts
@@ -0,0 +1,16 @@
1
+// alternate representations of data types
2
+
3
+import { Data } from '../CseMachineTypes';
4
5
+/** Returns `true` if `data` is a scheme number
6
+ * TODO: make this less hacky.
7
+ */
8
+function isSchemeNumber(data: Data): boolean {
9
+ return (data as any)?.numberType !== undefined;
10
+}
11
12
+// used to define custom primitives from alternate languages.
13
+// MAKE SURE the custom primitive has a toString() method!
14
+export function isCustomPrimitive(data: Data): boolean {
15
+ return isSchemeNumber(data);
16
0 commit comments