UNPKG

nizavisim

Version:

Независимый язык программирования с поддержкой русского языка.

11 lines (10 loc) 352 B
function interpreter(ast) { ast.forEach(node => { if (node.type === 'FunctionDeclaration') { console.log(`Объявлена функция: ${node.name}`); } else if (node.type === 'PrintStatement') { console.log(`Вывод: ${node.value}`); } }); } module.exports = { interpreter };