Skip to content

Commit 05055dc

Browse files
authored
Merge pull request #81 from easycoder/dev
Move/rename files
2 parents d96d823 + bcead6c commit 05055dc

File tree

4 files changed

+164
-158
lines changed

4 files changed

+164
-158
lines changed

dist/plugins/iwsy.js

Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
const EasyCoder_IWSY = {
2+
3+
name: `EasyCoder_IWSY`,
4+
5+
iwsy: {
6+
},
7+
8+
IWSY: {
9+
10+
compile: (compiler) => {
11+
12+
const lino = compiler.getLino();
13+
const action = compiler.nextToken();
14+
if ([`init`, `show`].includes(action)) {
15+
compiler.next();
16+
compiler.addCommand({
17+
domain: `iwsy`,
18+
keyword: `iwsy`,
19+
lino,
20+
action
21+
});
22+
return true;
23+
}
24+
return false;
25+
},
26+
27+
run: (program) => {
28+
const command = program[program.pc];
29+
const action = command.action;
30+
switch (action) {
31+
case `init`:
32+
program.require(`js`, `iwsy.js`,
33+
function () {
34+
program.run(command.pc + 1);
35+
});
36+
break;
37+
case `show`:
38+
break;
39+
}
40+
return command.pc + 1;
41+
}
42+
},
43+
44+
getHandler: (name) => {
45+
switch (name) {
46+
case `iwsy`:
47+
return EasyCoder_IWSY.IWSY;
48+
default:
49+
return null;
50+
}
51+
},
52+
53+
run: program => {
54+
const command = program[program.pc];
55+
const handler = EasyCoder_IWSY.getHandler(command.keyword);
56+
if (!handler) {
57+
program.runtimeError(command.lino, `Unknown keyword '${command.keyword}' in 'iwsy' package`);
58+
}
59+
return handler.run(program);
60+
},
61+
62+
value: {
63+
64+
compile: () => {
65+
return null;
66+
},
67+
68+
get: () => {
69+
return null;
70+
}
71+
},
72+
73+
condition: {
74+
75+
compile: () => {},
76+
77+
test: () => {}
78+
}
79+
};
80+
81+
// eslint-disable-next-line no-unused-vars
82+
EasyCoder.domain.iwsy = EasyCoder_IWSY;

dist/plugins/presenter.js

Lines changed: 0 additions & 79 deletions
This file was deleted.

js/plugins/iwsy.js

Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
const EasyCoder_IWSY = {
2+
3+
name: `EasyCoder_IWSY`,
4+
5+
iwsy: {
6+
},
7+
8+
IWSY: {
9+
10+
compile: (compiler) => {
11+
12+
const lino = compiler.getLino();
13+
const action = compiler.nextToken();
14+
if ([`init`, `show`].includes(action)) {
15+
compiler.next();
16+
compiler.addCommand({
17+
domain: `iwsy`,
18+
keyword: `iwsy`,
19+
lino,
20+
action
21+
});
22+
return true;
23+
}
24+
return false;
25+
},
26+
27+
run: (program) => {
28+
const command = program[program.pc];
29+
const action = command.action;
30+
switch (action) {
31+
case `init`:
32+
program.require(`js`, `iwsy.js`,
33+
function () {
34+
program.run(command.pc + 1);
35+
});
36+
break;
37+
case `show`:
38+
break;
39+
}
40+
return command.pc + 1;
41+
}
42+
},
43+
44+
getHandler: (name) => {
45+
switch (name) {
46+
case `iwsy`:
47+
return EasyCoder_IWSY.IWSY;
48+
default:
49+
return null;
50+
}
51+
},
52+
53+
run: program => {
54+
const command = program[program.pc];
55+
const handler = EasyCoder_IWSY.getHandler(command.keyword);
56+
if (!handler) {
57+
program.runtimeError(command.lino, `Unknown keyword '${command.keyword}' in 'iwsy' package`);
58+
}
59+
return handler.run(program);
60+
},
61+
62+
value: {
63+
64+
compile: () => {
65+
return null;
66+
},
67+
68+
get: () => {
69+
return null;
70+
}
71+
},
72+
73+
condition: {
74+
75+
compile: () => {},
76+
77+
test: () => {}
78+
}
79+
};
80+
81+
// eslint-disable-next-line no-unused-vars
82+
EasyCoder.domain.iwsy = EasyCoder_IWSY;

js/plugins/presenter.js

Lines changed: 0 additions & 79 deletions
This file was deleted.

0 commit comments

Comments
 (0)