import * as Models from '../visualUI/ivprog_elements'; function parseGlobal (global_obj) { var new_global = new Models.Variable( global_obj.type, global_obj.name, global_obj.value); new_global.is_constant = global_obj.is_const; new_global.columns = global_obj.columns; new_global.dimension = global_obj.dimension; new_global.rows = global_obj.rows; window.program_obj.addGlobal(new_global); } function parseFunction (function_obj) { } export function parserCodeVisual (code_obj = null) { console.log('chegou!', code_obj) window.conteudo = code_obj // Globals: code_obj.globals.forEach(parseGlobal); // Functions: code_obj.functions.forEach(parseFunction); }