fixed wiz and silice compile issues
This commit is contained in:
parent
55dc4226c7
commit
e6828766ce
|
@ -193,7 +193,10 @@ export class CodeProject {
|
|||
// for wiz
|
||||
let re5 = /^\s*(import|embed)\s+"(.+?)";/gmi;
|
||||
while (m = re5.exec(text)) {
|
||||
this.pushAllFiles(files, m[2] + ".wiz");
|
||||
if (m[1] == 'import')
|
||||
this.pushAllFiles(files, m[2] + ".wiz");
|
||||
else
|
||||
this.pushAllFiles(files, m[2]);
|
||||
}
|
||||
}
|
||||
return files;
|
||||
|
|
|
@ -1666,7 +1666,7 @@ function addFileToProject(type, ext, linefn) {
|
|||
function _addIncludeFile() {
|
||||
var fn = getCurrentMainFilename();
|
||||
var tool = platform.getToolForFilename(fn);
|
||||
// TODO: more tools?
|
||||
// TODO: more tools? make this a function of the platform / tool provider
|
||||
if (fn.endsWith(".c") || tool == 'sdcc' || tool == 'cc65' || tool == 'cmoc' || tool == 'smlrc')
|
||||
addFileToProject("Header", ".h", (s) => { return '#include "'+s+'"' });
|
||||
else if (tool == 'dasm' || tool == 'zmac')
|
||||
|
@ -1675,6 +1675,8 @@ function _addIncludeFile() {
|
|||
addFileToProject("Include", ".inc", (s) => { return '\t.include "'+s+'"' });
|
||||
else if (tool == 'verilator')
|
||||
addFileToProject("Verilog", ".v", (s) => { return '`include "'+s+'"' });
|
||||
else if (tool == 'wiz')
|
||||
addFileToProject("Include", ".wiz", (s) => { return 'import "'+s+'";' });
|
||||
else
|
||||
alertError("Can't add include file to this project type (" + tool + ")");
|
||||
}
|
||||
|
|
|
@ -2788,12 +2788,17 @@ function compileSilice(step:BuildStep) {
|
|||
var errfile : string;
|
||||
var errline : number;
|
||||
if (staleFiles(step, [destpath])) {
|
||||
//[preprocessor] 97] attempt to concatenate a nil value (global 'addrW')
|
||||
var match_fn = (s: string) => {
|
||||
s = (s as any).replaceAll(/\033\[\d+\w/g, '');
|
||||
var mf = /file:\s*(\w+)/.exec(s);
|
||||
var ml = /line:\s+(\d+)/.exec(s);
|
||||
var preproc = /\[preprocessor\] (\d+)\] (.+)/.exec(s);
|
||||
if (mf) errfile = mf[1];
|
||||
else if (ml) errline = parseInt(ml[1]);
|
||||
else if (preproc) {
|
||||
errors.push({path:step.path, line:parseInt(preproc[1]), msg:preproc[2]});
|
||||
}
|
||||
else if (errfile && errline && s.length > 1) {
|
||||
if (s.length > 2) {
|
||||
errors.push({path:errfile+".ice", line:errline, msg:s});
|
||||
|
@ -2802,6 +2807,7 @@ function compileSilice(step:BuildStep) {
|
|||
errline = null;
|
||||
}
|
||||
}
|
||||
else console.log(s);
|
||||
}
|
||||
var silice = emglobal.silice({
|
||||
instantiateWasm: moduleInstFn('silice'),
|
||||
|
|
Loading…
Reference in New Issue