Add ability for multiple compilers; add Python2
This commit is contained in:
parent
318a485bfb
commit
2dd50d8069
6 changed files with 33 additions and 7 deletions
|
@ -4,9 +4,21 @@ class Python extends Language {
|
|||
constructor() {
|
||||
super('python', {
|
||||
highlight: 'py',
|
||||
aliases: ['python', 'py']
|
||||
aliases: ['python', 'py'],
|
||||
loads: ['python', 'python2'],
|
||||
options: {
|
||||
2: () => ''
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
runWith(options) {
|
||||
if (options.has('2')) {
|
||||
return { id: 'python2', env: {} };
|
||||
}
|
||||
|
||||
return { id: 'python', env: {} };
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = Python;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue