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