gctGenerator/site/.vuepress/components/codes/codegen.js

30 lines
675 B
JavaScript
Raw Permalink Normal View History

import InstantRestart from './InstantRestart/codegen.js';
2022-04-21 08:25:35 +09:00
import qft from './qft/codegen.js';
2023-02-01 02:49:55 +09:00
import qfst from './qfst/codegen.js';
import CustomizedDisplay from './CustomizedDisplay/codegen.js';
import PatternSelector from './PatternSelector/codegen.js';
import AttemptCounter from './AttemptCounter/codegen.js';
2023-02-06 04:35:42 +09:00
import controller from './controller/codegen.js';
export default {
InstantRestart,
2022-04-08 16:29:24 +09:00
qft,
2023-02-01 02:49:55 +09:00
qfst,
CustomizedDisplay,
PatternSelector,
AttemptCounter,
2023-02-06 04:35:42 +09:00
controller,
};
/**
* @param {string|null} s -- raw input string
*/
export function parseJSON(s) {
if (s == null) return null;
try {
return JSON.parse(s);
} catch {
return null;
}
}