1 | declare function multiplication(a: number, b: number): number;
|
2 | declare function division(a: number, b: number): number;
|
3 | declare function addition(a: number, b: number): number;
|
4 | declare function last(...a: Array<number>): number;
|
5 | declare function subtraction(a: number, b: number): number;
|
6 | declare function negation(a: number): number;
|
7 | declare function comma(...a: Array<number | string>): Array<number | string>;
|
8 | declare function min(...a: Array<number>): number;
|
9 | declare function max(...a: Array<number>): number;
|
10 | declare const defaultSymbols: {
|
11 | symbols: {
|
12 | '*': {
|
13 | infix: {
|
14 | symbol: '*';
|
15 | f: multiplication;
|
16 | notation: 'infix';
|
17 | precedence: 4;
|
18 | rightToLeft: 0;
|
19 | argCount: 2;
|
20 | };
|
21 | symbol: '*';
|
22 | regSymbol: '\\*';
|
23 | };
|
24 | '/': {
|
25 | infix: {
|
26 | symbol: '/';
|
27 | f: division;
|
28 | notation: 'infix';
|
29 | precedence: 4;
|
30 | rightToLeft: 0;
|
31 | argCount: 2;
|
32 | };
|
33 | symbol: '/';
|
34 | regSymbol: '/';
|
35 | };
|
36 | '+': {
|
37 | infix: {
|
38 | symbol: '+';
|
39 | f: addition;
|
40 | notation: 'infix';
|
41 | precedence: 2;
|
42 | rightToLeft: 0;
|
43 | argCount: 2;
|
44 | };
|
45 | prefix: {
|
46 | symbol: '+';
|
47 | f: last;
|
48 | notation: 'prefix';
|
49 | precedence: 3;
|
50 | rightToLeft: 0;
|
51 | argCount: 1;
|
52 | };
|
53 | symbol: '+';
|
54 | regSymbol: '\\+';
|
55 | };
|
56 | '-': {
|
57 | infix: {
|
58 | symbol: '-';
|
59 | f: subtraction;
|
60 | notation: 'infix';
|
61 | precedence: 2;
|
62 | rightToLeft: 0;
|
63 | argCount: 2;
|
64 | };
|
65 | prefix: {
|
66 | symbol: '-';
|
67 | f: negation;
|
68 | notation: 'prefix';
|
69 | precedence: 3;
|
70 | rightToLeft: 0;
|
71 | argCount: 1;
|
72 | };
|
73 | symbol: '-';
|
74 | regSymbol: '-';
|
75 | };
|
76 | ',': {
|
77 | infix: {
|
78 | symbol: ',';
|
79 | f: comma;
|
80 | notation: 'infix';
|
81 | precedence: 1;
|
82 | rightToLeft: 0;
|
83 | argCount: 2;
|
84 | };
|
85 | symbol: ',';
|
86 | regSymbol: ',';
|
87 | };
|
88 | '(': {
|
89 | prefix: {
|
90 | symbol: '(';
|
91 | f: last;
|
92 | notation: 'prefix';
|
93 | precedence: 0;
|
94 | rightToLeft: 0;
|
95 | argCount: 1;
|
96 | };
|
97 | symbol: '(';
|
98 | regSymbol: '\\(';
|
99 | };
|
100 | ')': {
|
101 | postfix: {
|
102 | symbol: ')';
|
103 | f: undefined;
|
104 | notation: 'postfix';
|
105 | precedence: 0;
|
106 | rightToLeft: 0;
|
107 | argCount: 1;
|
108 | };
|
109 | symbol: ')';
|
110 | regSymbol: '\\)';
|
111 | };
|
112 | min: {
|
113 | func: {
|
114 | symbol: 'min';
|
115 | f: min;
|
116 | notation: 'func';
|
117 | precedence: 0;
|
118 | rightToLeft: 0;
|
119 | argCount: 1;
|
120 | };
|
121 | symbol: 'min';
|
122 | regSymbol: 'min\\b';
|
123 | };
|
124 | max: {
|
125 | func: {
|
126 | symbol: 'max';
|
127 | f: max;
|
128 | notation: 'func';
|
129 | precedence: 0;
|
130 | rightToLeft: 0;
|
131 | argCount: 1;
|
132 | };
|
133 | symbol: 'max';
|
134 | regSymbol: 'max\\b';
|
135 | };
|
136 | };
|
137 | };
|
138 |
|
139 | export default defaultSymbols;
|