1 В избранное 0 Ответвления 0

OSCHINA-MIRROR/langhuihui-Imprint-genetics

Присоединиться к Gitlife
Откройте для себя и примите участие в публичных проектах с открытым исходным кодом с участием более 10 миллионов разработчиков. Приватные репозитории также полностью бесплатны :)
Присоединиться бесплатно
В этом репозитории не указан файл с открытой лицензией (LICENSE). При использовании обратитесь к конкретному описанию проекта и его зависимостям в коде.
Клонировать/Скачать
enzyme.js 1 КБ
Копировать Редактировать Web IDE Исходные данные Просмотреть построчно История
unknown Отправлено 04.12.2017 14:54 ac7f1cc
const RNA = require('./RNA')
class Enzyme {
constructor(parent) {
this.gene = new RNA()
this.gene.from = parent
this.cmd = []
this.copying = false
this.ss = new Set()
}
build(cmd, g1, g2) {
this.cmd.push(cmd)
this.gene.push(g1, g2)
}
exec(s) {
this.origin = s
let originStr = s.toString()
this.s = RNA.parse(originStr)
this.p = s.findIndex(d => d == this.like)
for (let x of this.cmd) {
if (this.s) x.call(this)
else break
}
this.quit()
}
quit() {
if (this.s) {
this.ss.add(this.s)
this.s = null
}
if (this.s1) {
this.ss.add(this.s1)
this.s1 = null
}
this.ss.forEach(s => {
Object.setPrototypeOf(s, RNA.prototype)
s.from = [this.origin, this]
})
this.copying = false
}
toString() {
return this.gene.toString()
}
}
module.exports = Enzyme

Опубликовать ( 0 )

Вы можете оставить комментарий после Вход в систему

1
https://api.gitlife.ru/oschina-mirror/langhuihui-Imprint-genetics.git
git@api.gitlife.ru:oschina-mirror/langhuihui-Imprint-genetics.git
oschina-mirror
langhuihui-Imprint-genetics
langhuihui-Imprint-genetics
master