Skip to content

Commit

Permalink
Fix Verification after FSM Generation (#64)
Browse files Browse the repository at this point in the history
* Make names of new transitions have a simlpe countered id and not have any spaces, to not break verification

* remove extra semicolons
  • Loading branch information
arora-r authored Mar 26, 2021
1 parent 1e94f2a commit 0f685fa
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/plugins/FSMGenerator/FSMGenerator.js
Original file line number Diff line number Diff line change
Expand Up @@ -97,16 +97,17 @@ define([

const state = self.core.createChild(self.activeNode, self.core.getAllMetaNodes(self.activeNode)['/m/9'])
self.core.setAttribute(state, 'name', 'core')

let counter = 0
functions.forEach(fn => {
const transition = self.core.createChild(self.activeNode, self.core.getAllMetaNodes(self.activeNode)['/m/A'])
self.core.setAttribute(transition, 'name', fn.name.replace('fun ', ''))
self.core.setAttribute(transition, 'name', fn.name.replace('fun ', '').trim() + counter)
self.core.setAttribute(transition, 'statements', fn.code)
self.core.setAttribute(transition, 'input', fn.inputs)
self.core.setAttribute(transition, 'output', fn.outputs)
// self.core.setAttribute(transition, 'tags', fn.tags);
self.core.setPointer(transition, 'src', state)
self.core.setPointer(transition, 'dst', state)
counter++
})

// Creation of initial state node
Expand Down

0 comments on commit 0f685fa

Please sign in to comment.