@andrivet/z80-assembler 1.3.0 → 1.3.1
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/CHANGELOG.md +7 -1
- package/index.d.ts +2 -2
- package/index.js +91 -28
- package/index.mjs +1650 -2479
- package/lib/compiler/Assets.d.ts +0 -9
- package/lib/compiler/Ast.d.ts +0 -53
- package/lib/compiler/Compiler.d.ts +0 -25
- package/lib/compiler/Formatter.d.ts +0 -13
- package/lib/compiler/Generator.d.ts +0 -1
- package/lib/compiler/Labels.d.ts +1 -25
- package/lib/grammar/LowLevel.d.ts +0 -37
- package/lib/grammar/Parse.d.ts +0 -29
- package/lib/grammar/z80.d.ts +207 -873
- package/lib/types/Error.d.ts +0 -28
- package/lib/types/Types.d.ts +0 -15
- package/package.json +2 -2
package/lib/types/Error.d.ts
CHANGED
|
@@ -7,83 +7,55 @@
|
|
|
7
7
|
* License: GPLv3
|
|
8
8
|
* Copyrights: Copyright (C) 2023 Sebastien Andrivet
|
|
9
9
|
*/
|
|
10
|
-
/**
|
|
11
|
-
* Assembler Z80 en Typescript
|
|
12
|
-
*
|
|
13
|
-
* Fichier: Error.ts
|
|
14
|
-
* Description: Erreurs de compilation
|
|
15
|
-
* Author: Sebastien Andrivet
|
|
16
|
-
* License: GPLv3
|
|
17
|
-
* Copyrights: Copyright (C) 2023 Sebastien Andrivet
|
|
18
|
-
*/
|
|
19
10
|
import { SyntaxErr } from "../grammar/z80";
|
|
20
11
|
import { Position } from "./Types";
|
|
21
12
|
/**
|
|
22
13
|
* A compilation error.
|
|
23
|
-
* Une erreur de compilation.
|
|
24
14
|
*/
|
|
25
15
|
declare class CompilationError extends Error {
|
|
26
16
|
readonly position: Position;
|
|
27
17
|
/**
|
|
28
18
|
* Constructor.
|
|
29
|
-
* Constructeur.
|
|
30
19
|
* @param position Position (filename, line, offset) where the error occurred.
|
|
31
|
-
* Position (fichier, line, décalage) où s'est produite l'erreur.
|
|
32
20
|
* @param message Description of the error.
|
|
33
|
-
* Description de l'erreur.
|
|
34
21
|
*/
|
|
35
22
|
constructor(position: Position, message: string);
|
|
36
23
|
/**
|
|
37
24
|
* Format the error.
|
|
38
|
-
* Formate l'erreur.
|
|
39
25
|
*/
|
|
40
26
|
toString(): string;
|
|
41
27
|
/**
|
|
42
28
|
* Format internal MatchAttempt.
|
|
43
|
-
* Formate le MatchAttempt interne.
|
|
44
29
|
* @param match The MatchAttempt to format.
|
|
45
|
-
* Le MatchAttempt à formater.
|
|
46
30
|
* @private
|
|
47
31
|
*/
|
|
48
32
|
private static formatMatch;
|
|
49
33
|
/**
|
|
50
34
|
* Format a syntax error.
|
|
51
|
-
* Formate une erreur de syntaxe.
|
|
52
35
|
* @param err a syntax error.
|
|
53
|
-
* L'erreur de syntaxe.
|
|
54
36
|
* @private
|
|
55
37
|
*/
|
|
56
38
|
private static formatError;
|
|
57
39
|
/**
|
|
58
40
|
* Create a compilation error from a syntax error.
|
|
59
|
-
* Crée une erreur de compilation depuis une erreur de syntaxe.
|
|
60
41
|
* @param filename Filename where the error occurred.
|
|
61
|
-
* Fichier où s'est produite l'erreur.
|
|
62
42
|
* @param e Syntax error.
|
|
63
|
-
* L'erreur de syntaxe.
|
|
64
43
|
*/
|
|
65
44
|
static fromSyntaxErr(filename: string, e: SyntaxErr): CompilationError;
|
|
66
45
|
/**
|
|
67
46
|
* Create a compilation error from different errors.
|
|
68
|
-
* Crée une erreur de compilation depuis différents types d'erreur.
|
|
69
47
|
* @param filename Filename where the error occurred.
|
|
70
|
-
* Fichier où s'est produite l'erreur.
|
|
71
48
|
* @param e The error
|
|
72
|
-
* L'erreur.
|
|
73
49
|
*/
|
|
74
50
|
static fromAny(filename: string, e: any): CompilationError;
|
|
75
51
|
/**
|
|
76
52
|
* Check if an error is a compilation error (and cast the error in this case).
|
|
77
|
-
* Vérifie si une erreur est une erreur de compilation (and convertit le type de l'erreur dans ce cas).
|
|
78
53
|
* @param err The error to check.
|
|
79
|
-
* L'erreur à vérifier.
|
|
80
54
|
*/
|
|
81
55
|
static is(err: any): err is CompilationError;
|
|
82
56
|
/**
|
|
83
57
|
* Check if an error is an array of compilation errors (and cast the type in this case).
|
|
84
|
-
* Vérifie si une erreur est un tableau d'erreurs de compilation (and convertit le type dans ce cas).
|
|
85
58
|
* @param err The error to check.
|
|
86
|
-
* L'erreur à vérifier.
|
|
87
59
|
*/
|
|
88
60
|
static isArray(err: any): err is CompilationError[];
|
|
89
61
|
}
|
package/lib/types/Types.d.ts
CHANGED
|
@@ -7,36 +7,22 @@
|
|
|
7
7
|
* License: GPLv3
|
|
8
8
|
* Copyrights: Copyright (C) 2023 Sebastien Andrivet
|
|
9
9
|
*/
|
|
10
|
-
/**
|
|
11
|
-
* Assembler Z80 en Typescript
|
|
12
|
-
*
|
|
13
|
-
* Fichier: Types.ts
|
|
14
|
-
* Description: Types partagés
|
|
15
|
-
* Author: Sebastien Andrivet
|
|
16
|
-
* License: GPLv3
|
|
17
|
-
* Copyrights: Copyright (C) 2023 Sebastien Andrivet
|
|
18
|
-
*
|
|
19
|
-
*/
|
|
20
10
|
import { Line, PosInfo } from "../grammar/z80";
|
|
21
11
|
import { CompilationError } from "./Error";
|
|
22
12
|
/**
|
|
23
13
|
* A byte is represented by a number.
|
|
24
|
-
* Un octet est représenté par un nombre.
|
|
25
14
|
*/
|
|
26
15
|
type byte = number;
|
|
27
16
|
/**
|
|
28
17
|
* An array of bytes.
|
|
29
|
-
* Un tableau d'octets.
|
|
30
18
|
*/
|
|
31
19
|
type bytes = byte[];
|
|
32
20
|
/**
|
|
33
21
|
* An address is either a number (known) or null (unknown).
|
|
34
|
-
* Une adresse est soit un nombre (connue) soit nulle (inconnue).
|
|
35
22
|
*/
|
|
36
23
|
type Address = number | null;
|
|
37
24
|
/**
|
|
38
25
|
* Information about lines.
|
|
39
|
-
* Informations à propos de lignes.
|
|
40
26
|
*/
|
|
41
27
|
interface LinesInfo {
|
|
42
28
|
lines: Line[];
|
|
@@ -44,7 +30,6 @@ interface LinesInfo {
|
|
|
44
30
|
}
|
|
45
31
|
/**
|
|
46
32
|
* The result of a compilation.
|
|
47
|
-
* Le résultat d'une compilation.
|
|
48
33
|
*/
|
|
49
34
|
interface CompilationInfo {
|
|
50
35
|
outputName: string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@andrivet/z80-assembler",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.1",
|
|
4
4
|
"description": "A Z80 assembler entirely written in Typescript and derived from a PEG grammar.",
|
|
5
5
|
"author": "Sebastien Andrivet",
|
|
6
6
|
"license": "GPLv3",
|
|
@@ -15,6 +15,6 @@
|
|
|
15
15
|
},
|
|
16
16
|
"repository": {
|
|
17
17
|
"type": "git",
|
|
18
|
-
"url": "https://github.com/andrivet/z80-assembler"
|
|
18
|
+
"url": "git+https://github.com/andrivet/z80-assembler.git"
|
|
19
19
|
}
|
|
20
20
|
}
|