@andrivet/z80-assembler 1.2.0 → 1.3.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 +7 -0
- package/index.js +12 -12
- package/index.mjs +1608 -1180
- package/lib/compiler/Ast.d.ts +18 -11
- package/lib/compiler/Labels.d.ts +9 -10
- package/lib/grammar/z80.d.ts +784 -508
- package/lib/types/Error.d.ts +6 -8
- package/lib/types/Types.d.ts +9 -2
- package/package.json +1 -1
package/lib/types/Error.d.ts
CHANGED
|
@@ -16,25 +16,23 @@
|
|
|
16
16
|
* License: GPLv3
|
|
17
17
|
* Copyrights: Copyright (C) 2023 Sebastien Andrivet
|
|
18
18
|
*/
|
|
19
|
-
import {
|
|
19
|
+
import { SyntaxErr } from "../grammar/z80";
|
|
20
|
+
import { Position } from "./Types";
|
|
20
21
|
/**
|
|
21
22
|
* A compilation error.
|
|
22
23
|
* Une erreur de compilation.
|
|
23
24
|
*/
|
|
24
25
|
declare class CompilationError extends Error {
|
|
25
|
-
readonly
|
|
26
|
-
readonly pos: PosInfo;
|
|
26
|
+
readonly position: Position;
|
|
27
27
|
/**
|
|
28
28
|
* Constructor.
|
|
29
29
|
* Constructeur.
|
|
30
|
-
* @param filename
|
|
31
|
-
*
|
|
32
|
-
* @param pos Position (line, offset) where the error occurred.
|
|
33
|
-
* Position (line, décalage) où s'est produite l'erreur.
|
|
30
|
+
* @param position Position (filename, line, offset) where the error occurred.
|
|
31
|
+
* Position (fichier, line, décalage) où s'est produite l'erreur.
|
|
34
32
|
* @param message Description of the error.
|
|
35
33
|
* Description de l'erreur.
|
|
36
34
|
*/
|
|
37
|
-
constructor(
|
|
35
|
+
constructor(position: Position, message: string);
|
|
38
36
|
/**
|
|
39
37
|
* Format the error.
|
|
40
38
|
* Formate l'erreur.
|
package/lib/types/Types.d.ts
CHANGED
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
* Copyrights: Copyright (C) 2023 Sebastien Andrivet
|
|
18
18
|
*
|
|
19
19
|
*/
|
|
20
|
-
import { Line } from "../grammar/z80";
|
|
20
|
+
import { Line, PosInfo } from "../grammar/z80";
|
|
21
21
|
import { CompilationError } from "./Error";
|
|
22
22
|
/**
|
|
23
23
|
* A byte is represented by a number.
|
|
@@ -52,4 +52,11 @@ interface CompilationInfo {
|
|
|
52
52
|
sld: string;
|
|
53
53
|
errs: CompilationError[];
|
|
54
54
|
}
|
|
55
|
-
|
|
55
|
+
/**
|
|
56
|
+
* Position in a source file.
|
|
57
|
+
*/
|
|
58
|
+
interface Position {
|
|
59
|
+
filename: string;
|
|
60
|
+
pos: PosInfo;
|
|
61
|
+
}
|
|
62
|
+
export { byte, bytes, Address, LinesInfo, CompilationInfo, Position };
|