Jaseci-Labs / jaseci

The Official Jaseci Code Repository
https://jaseci.org
156 stars 214 forks source link

[WIP] python wrapper for codegen by Thami #1469

Open Thamirawaran opened 4 days ago

Thamirawaran commented 4 days ago

Description

from jaclang import *

class MyNode(JacNode):
    val:int = 0

class a(JacEdge):
    pass

class b(JacEdge):
    pass

class c(JacEdge):
    pass

Start = MyNode(5);
root.connect(Start, a) # root +:a:+> Start;
Start.connect(MyNode(10), b).connect(MyNode(15), c) # Start +:b:+> MyNode(10) +:c:+> MyNode(15);
Start.connect(MyNode(20), b).connect(MyNode(25), a) # Start +:b:+> MyNode(20) +:a:+> MyNode(25);
Start.connected(OUT, b).connected(OUT, c) #[Start-:b:->-:c:->]