mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
judge: 可调的性能设置
This commit is contained in:
1 parent
8c8dcb89eb
commit
2bf1a18890
21 files changed
+237
-274
No files matched your search
@@ -4,13 +4,12 @@ import { run, del } from './sandbox';
|
||||
import { CompileError, SystemError } from './error';
|
||||
import { compilerText } from './utils';
|
||||
import { Execute } from './interface';
|
||||
import { getConfig } from './config';
|
||||
|
||||
export = async function compile(
|
||||
lang: string, code: string, target: string, copyIn: any, next?: Function,
|
||||
): Promise<Execute> {
|
||||
const LANGS = global.Hydro
|
||||
? yaml.load(global.Hydro.model.system.get('hydrojudge.langs'))
|
||||
: require('./config').LANGS;
|
||||
const LANGS = yaml.load(getConfig('langs'));
|
||||
if (!LANGS[lang]) throw new SystemError('Unsupported language {0}.', [lang]);
|
||||
const info = LANGS[lang];
|
||||
target = info.target || target;
|
||||
|
||||
Reference in new issue
Block a user