import React, { useState } from 'react'; import './PhonoChangeApplier.scss'; import ProtoLang from './components/ProtoLang'; import Features from './components/Features'; import Epochs from './components/Epochs'; import Options from './components/Options'; import Output from './components/Output'; const PhonoChangeApplier = () => { const [ lexicon, setLexicon ] = useState(['one']); const [ phonemes, setPhonemes ] = useState( { phoneme: [ 'feature' ] } ); const [ epochs, setEpochs ] = useState([{name: 'epoch 1', changes:['[+ feature]>[- feature]/_#']}]); const [ options, setOptions ] = useState({output: 'default', save: false}) const [ results, setResults ] = useState([]) const runChanges = e => { e.preventDefault(); // validate rules console.log(epochs.forEach(epoch => { if (epoch.changes.find(change => !change.match(/>.*\/.*_/))) console.log({error: 'improper rule formatting'}); })) // validate lexicon } return (