mirror of
https://github.com/captbaritone/webamp.git
synced 2026-07-23 18:17:38 +00:00
Don't leak data from constants outside of the parserEventually we will get rid of the object in constants, so we don't want others to expect this data to be here.
This commit is contained in:
parent
19c24d18f9
commit
f5d080dcf7
1 changed files with 2 additions and 7 deletions
|
|
@ -220,18 +220,13 @@ function parseComand({ start, makiFile, length, pos }) {
|
|||
pos,
|
||||
opcode,
|
||||
arg: null,
|
||||
command: COMMANDS[opcode],
|
||||
};
|
||||
|
||||
if (command.command == null) {
|
||||
throw new Error(`Unknown opcode "${opcode}"`);
|
||||
}
|
||||
|
||||
if (command.command.arg == null) {
|
||||
const argType = COMMANDS[opcode].arg;
|
||||
if (argType == null) {
|
||||
return command;
|
||||
}
|
||||
|
||||
const argType = command.command.arg;
|
||||
let arg = null;
|
||||
switch (argType) {
|
||||
case "var": {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue