Assemble kernel on the client #1
14
asm.js
14
asm.js
@@ -550,15 +550,10 @@ class Parser {
|
|||||||
|
|
||||||
token_at_addr(token) {
|
token_at_addr(token) {
|
||||||
const value = this.integer(token);
|
const value = this.integer(token);
|
||||||
if (value == null) {
|
if (value != null)
|
||||||
console.error(
|
|
||||||
`ERROR: Unexpected token ${token} in .mem: `
|
|
||||||
+ "expected address");
|
|
||||||
this.at = undefined;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
this.at.addr = value;
|
this.at.addr = value;
|
||||||
|
else
|
||||||
|
this.at.addr_symbol = token;
|
||||||
const action = { type: Action.AT, at: this.at };
|
const action = { type: Action.AT, at: this.at };
|
||||||
this.at = undefined;
|
this.at = undefined;
|
||||||
this.state = State.TOP;
|
this.state = State.TOP;
|
||||||
@@ -998,7 +993,8 @@ export class Assembler {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
this.pos.mem = mem;
|
this.pos.mem = mem;
|
||||||
this.pos.addr = action.at.addr;
|
this.pos.addr = action.at.addr
|
||||||
|
?? this.lookup_def(action.at.addr_symbol);
|
||||||
this.data.push({ loc: { ...this.pos }, data: [] })
|
this.data.push({ loc: { ...this.pos }, data: [] })
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user