mirror of
https://github.com/sehugg/8bitworkshop.git
synced 2026-10-24 08:02:27 +00:00
dasm: detect unquoted filenames in detect.ts, but incbin needs quotes
This commit is contained in:
1 parent
9c2c1c6ed2
commit
31b382cd1a
2 files changed
+6
-3
No files matched your search
@@ -217,11 +217,12 @@ export async function detectProject(input: DetectInput): Promise<Detection[]> {
|
||||
var text = await input.read(file);
|
||||
if (text == null) continue;
|
||||
texts.set(file, text);
|
||||
// includes, with their line numbers for the evidence
|
||||
var re = /^[ \t]*[#.]?[ \t]*include\s+[<"]([^>"]+)[>"]/gim;
|
||||
// includes, with their line numbers for the evidence. Quoted (C, ca65),
|
||||
// angle-bracketed (C), or bare (DASM, bB) -- name is whichever matched.
|
||||
var re = /^[ \t]*[#.]?[ \t]*include\s+(?:"([^"]+)"|<([^>]+)>|([^\s;]+))/gim;
|
||||
var inc: RegExpExecArray | null;
|
||||
while ((inc = re.exec(text)) != null) {
|
||||
var name = inc[1];
|
||||
var name = inc[1] || inc[2] || inc[3];
|
||||
// a local copy of a library header (neslib.h) still counts
|
||||
var list = headers[name] || headers[basename(name)];
|
||||
if (!list) continue;
|
||||
|
||||
@@ -41,6 +41,8 @@ directives:
|
||||
.incbin "tileset.chr"
|
||||
```
|
||||
|
||||
With DASM, make sure to quote the filename in `incbin`.
|
||||
|
||||
## C preprocessor defines
|
||||
|
||||
The preprocessor macro `__MAIN__` is defined when compiling the main C
|
||||
|
||||
Reference in new issue
Block a user