frame_transpiler icon indicating copy to clipboard operation
frame_transpiler copied to clipboard

Message alias feature

Open frame-lang opened this issue 2 years ago • 0 comments

fn main {
    var alias:# = #AliasDemo()
    alias.start()
    alias.one_two_three()
    alias.stop()
}

#AliasDemo 

    -interface-

    start @(">>")
    one_two_three @("1..2..3")
    stop @(`<<`)

    -machine-

    $Stopped
        |>| print("In $Stopped") ^
        |stop| print("In $Stopped") ^
        |">>"| 
            print("Saw '>>'") 
            -> $Countdown ^

    $Countdown
        |>| print("In $Countdown") ^
        |`1..2..3`|
            print("Saw '1..2..3'") 
            -> $Running ^
    
    $Running
        |>| print("In $Running") ^
        |`<<`|  
            print("Saw '<<'") 
            -> $Stopped ^
##

frame-lang avatar Nov 21 '23 14:11 frame-lang