pure-dango 1.8.1 → 1.8.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/PureDango.cjs +9425 -0
- package/dist/PureDangoLauncher.exe +0 -0
- package/package.json +5 -2
- package/src/globals.d.ts +15 -0
- package/src/index.ts +1 -1
- package/src/types.d.ts +102 -0
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,12 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pure-dango",
|
|
3
|
-
"version": "1.8.
|
|
3
|
+
"version": "1.8.3",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "A simple programming language built in JavaScript",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"files": [
|
|
8
8
|
"src/core",
|
|
9
|
-
"src/runtime"
|
|
9
|
+
"src/runtime",
|
|
10
|
+
"src/types.d.ts",
|
|
11
|
+
"src/globals.d.ts",
|
|
12
|
+
"dist"
|
|
10
13
|
],
|
|
11
14
|
"bin": {
|
|
12
15
|
"pure-dango": "src/index.ts"
|
package/src/globals.d.ts
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
declare namespace NodeJS
|
|
2
|
+
{
|
|
3
|
+
interface Process
|
|
4
|
+
{
|
|
5
|
+
pkg?:
|
|
6
|
+
{
|
|
7
|
+
entrypoint: string;
|
|
8
|
+
defaultEntryPoint: string;
|
|
9
|
+
};
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
declare const PACKAGE_NAME: string | undefined;
|
|
14
|
+
declare const PACKAGE_VERSION: string | undefined;
|
|
15
|
+
declare const PACKAGE_DESCRIPTION: string | undefined;
|
package/src/index.ts
CHANGED
|
@@ -38,7 +38,7 @@ const
|
|
|
38
38
|
const packageJson =
|
|
39
39
|
{
|
|
40
40
|
name: typeof PACKAGE_NAME !== "undefined" ? PACKAGE_NAME : "pure-dango",
|
|
41
|
-
version: typeof PACKAGE_VERSION !== "undefined" ? PACKAGE_VERSION : "1.8.
|
|
41
|
+
version: typeof PACKAGE_VERSION !== "undefined" ? PACKAGE_VERSION : "1.8.2",
|
|
42
42
|
description: typeof PACKAGE_DESCRIPTION !== "undefined" ? PACKAGE_DESCRIPTION : "A simple programming language built in JavaScript"
|
|
43
43
|
};
|
|
44
44
|
|
package/src/types.d.ts
ADDED
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
type BaseToken =
|
|
2
|
+
{
|
|
3
|
+
type : string
|
|
4
|
+
value : string
|
|
5
|
+
row : number
|
|
6
|
+
column : number
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
type ParserToken =
|
|
10
|
+
{
|
|
11
|
+
type : string,
|
|
12
|
+
|
|
13
|
+
argument? : ParserToken | null | undefined,
|
|
14
|
+
name? : any,
|
|
15
|
+
value? : any,
|
|
16
|
+
object? : any,
|
|
17
|
+
property? : any,
|
|
18
|
+
|
|
19
|
+
constant? : boolean,
|
|
20
|
+
typeAnnotation? : boolean,
|
|
21
|
+
|
|
22
|
+
operator? : string,
|
|
23
|
+
left? : any,
|
|
24
|
+
right? : any,
|
|
25
|
+
|
|
26
|
+
condition? : ParserToken,
|
|
27
|
+
|
|
28
|
+
args? :
|
|
29
|
+
(
|
|
30
|
+
ParserToken |
|
|
31
|
+
{
|
|
32
|
+
type: string;
|
|
33
|
+
argument: ParserToken;
|
|
34
|
+
row: number;
|
|
35
|
+
column: number;
|
|
36
|
+
}
|
|
37
|
+
)[],
|
|
38
|
+
|
|
39
|
+
index? : ParserToken,
|
|
40
|
+
|
|
41
|
+
initial? : ParserToken | null,
|
|
42
|
+
update? : ParserToken,
|
|
43
|
+
|
|
44
|
+
parameters? : {name: string, default: ParserToken | null, rest: boolean}[],
|
|
45
|
+
methods? : ParserToken[],
|
|
46
|
+
|
|
47
|
+
body? : ParserToken | ParserToken[],
|
|
48
|
+
returnType? : string | null,
|
|
49
|
+
then? : ParserToken,
|
|
50
|
+
else? : ParserToken | ParserToken[] | null,
|
|
51
|
+
|
|
52
|
+
tryBlock?: ParserToken[],
|
|
53
|
+
catchBlock?: ParserToken[],
|
|
54
|
+
finallyBlock?: ParserToken[] | null,
|
|
55
|
+
|
|
56
|
+
names?: string[],
|
|
57
|
+
|
|
58
|
+
discriminant?: ParserToken | null,
|
|
59
|
+
cases?: any[],
|
|
60
|
+
defaultCase?: any,
|
|
61
|
+
|
|
62
|
+
isDeclaration?: boolean,
|
|
63
|
+
|
|
64
|
+
errorVariable?: string,
|
|
65
|
+
|
|
66
|
+
elements? : ParserToken[],
|
|
67
|
+
|
|
68
|
+
className? : string,
|
|
69
|
+
variableName? : string,
|
|
70
|
+
|
|
71
|
+
path? : string,
|
|
72
|
+
|
|
73
|
+
superclass? : string | null,
|
|
74
|
+
|
|
75
|
+
row : number,
|
|
76
|
+
column : number
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
type AST =
|
|
80
|
+
{
|
|
81
|
+
type : "Program",
|
|
82
|
+
body : ParserToken[]
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
type Operator =
|
|
86
|
+
{
|
|
87
|
+
prec : number,
|
|
88
|
+
assoc : string,
|
|
89
|
+
type : string,
|
|
90
|
+
fix? : string
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
type Operators = Record<string, Operator>;
|
|
94
|
+
|
|
95
|
+
type Tokens = BaseToken[];
|
|
96
|
+
|
|
97
|
+
type State =
|
|
98
|
+
{
|
|
99
|
+
time : number,
|
|
100
|
+
position : number,
|
|
101
|
+
lastToken : BaseToken | null
|
|
102
|
+
}
|