Skip to content

Commit

Permalink
compose -- PortPush and PortReconnect simple use of `disconnect…
Browse files Browse the repository at this point in the history
…Port`
  • Loading branch information
xieyuheng committed Sep 17, 2023
1 parent 13eefb2 commit 52add32
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
4 changes: 2 additions & 2 deletions TODO.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@

[half-edge] `Edge` has two `HalfEdge`s

[half-edge] avoid using `closeAllFreePorts`

[half-edge] `HalfEdge` should be a kind of `Value`

[half-edge] avoid using `closeAllFreePorts`

[half-edge] `@edge` as a builtin to create two `HalfEdge`s

# docs
Expand Down
4 changes: 2 additions & 2 deletions src/lang/compose/compose.ts
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ export function compose(
)
}

disconnectPort(env.net, portEntry.connection.port)
disconnectPort(env.net, currentPort)

env.stack.push(currentPort)
return null
Expand All @@ -123,7 +123,7 @@ export function compose(
)
}

disconnectPort(env.net, portEntry.connection.port)
disconnectPort(env.net, currentPort)

const value = env.stack.pop()
if (value === undefined) {
Expand Down
1 change: 1 addition & 0 deletions src/lang/net/Net.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,5 +56,6 @@ export type PortEntry = {
// interfere with each other.

export type Connection = {
// halfEdge: HalfEdge
port: Port
}

0 comments on commit 52add32

Please sign in to comment.