-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathreservedKeys.ts
28 lines (23 loc) · 1.03 KB
/
reservedKeys.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
import { customFetch } from "./customClasses/async.js";
import { input, wait } from "./customClasses/helpers.js";
export const ReservedKeys = ['const', 'let', 'var', 'internal', 'external', 'fun', 'ion', 'pinknodders', 'return', 'for', 'in', 'of', 'break', 'print', 'error', 'me'];
export const ReservedFunctions = {
'print': (...inp: any) => console.log(...inp),
'echo': (...inp: any) => console.log(...inp),
'error': (...inp: any) => console.error(...inp),
'fetch': (...inp: any) => new customFetch(inp),
'fork': (..._: any) => null,
'wait': (...inp: any) => wait(inp),
'input': (...inp: any) => input(inp)
};
export const asyncFuncs = [
'fetch',
'wait',
'input'
]
export const declairators = ['create', 'make', 'const', 'var', 'let', 'internal', 'external'];
export const pseudoFuncs = ['while', 'for', 'if', 'else', 'break'];
export const trycatchthrowKeys = ['try', 'catch', 'throw'];
// obsolete?
const openingCharacters = ['(', '[', '{'];
const closingCharacters = { '(': ')', '[': ']', '{': '}' };