// Imports import {variables} from "../variables/variables"; import {eltP} from "codemirror/src/util/dom"; import {operations} from "./operations"; // Imports // ********************************************************************************* // Scheme for the operations list // ********************************************************************************* export const operationScheme = { hash: 'UUID for the operation', assignedVariable: 'Reference to the assigned variable', operators: [] } // ********************************************************************************* // Scheme for the operators // ********************************************************************************* export const operatorScheme = { hash: 'UUID for the operator', type: 'Operator type', value: 'Operator value', variable: 'Reference to the variable', operator: 'Reference to operator' } // ********************************************************************************* // Operator types // ********************************************************************************* export const operatorTypes = [ { name: 'Variável', value: 'VARIABLE' }, { name: 'Valor', value: 'VALUE' }, { name: 'Operator', value: 'OPERATOR' } ] // ********************************************************************************* // Operation types // ********************************************************************************* export const operationTypes = [ { name: ';', value: 'SEMICOLON' }, { name: '+', value: 'PLUS' }, { name: '-', value: 'MINUS' }, { name: '*', value: 'MULTIPLICATION' }, { name: '/', value: 'DIVISION' }, { name: '(', value: 'OPEN_PARENTHESES' }, { name: ')', value: 'CLOSE_PARENTHESES' }, ] // ********************************************************************************* // Operator kinds // ********************************************************************************* export const operatorKinds = [ { name: 'Variável', value: 'VARIABLE' }, { name: 'Valor', value: 'VALUE' } ] // ********************************************************************************* // Operation type html schemes // ********************************************************************************* export function htmlOperationTypeScheme() { let operationTypesSelect = ``; for (let i = 0; i < operationTypes.length; i++) { operationTypesSelect += ``; } return ``; } // ********************************************************************************* // Assign variable operation kind html schemes // ********************************************************************************* export function htmlOperationKindScheme(operation) { let operatorKindsSelect = ``; for (let i = 0; i < operatorKinds.length; i++) { operatorKindsSelect += ``; } return ``; } // ********************************************************************************* // Assign variable html schemes // ********************************************************************************* export function htmlAssignVariableScheme() { let variablesSelect = htmlVariablesSelectScheme(); return `