From 6ec8f20fc506af4af5513803fb9a708e4f7b5040 Mon Sep 17 00:00:00 2001 From: Bruce Hill Date: Wed, 2 Apr 2025 16:14:20 -0400 Subject: Syntax change: table types are now: `{K=V; default=...}` and tables use `{:K=V, ...; default=...}` --- examples/commands/commands.tm | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'examples/commands') diff --git a/examples/commands/commands.tm b/examples/commands/commands.tm index 26b82790..cbf5439b 100644 --- a/examples/commands/commands.tm +++ b/examples/commands/commands.tm @@ -3,8 +3,8 @@ use ./commands.c use -lunistring -extern run_command:func(exe:Text, args:[Text], env:{Text,Text}, input:[Byte]?, output:&[Byte]?, error:&[Byte]? -> Int32) -extern command_by_line:func(exe:Text, args:[Text], env:{Text,Text} -> func(->Text?)?) +extern run_command:func(exe:Text, args:[Text], env:{Text=Text}, input:[Byte]?, output:&[Byte]?, error:&[Byte]? -> Int32) +extern command_by_line:func(exe:Text, args:[Text], env:{Text=Text} -> func(->Text?)?) enum ExitType(Exited(status:Int32), Signaled(signal:Int32), Failed): func succeeded(e:ExitType -> Bool): @@ -46,8 +46,8 @@ struct ProgramResult(stdout:[Byte], stderr:[Byte], exit_type:ExitType): else: return no -struct Command(command:Text, args=[:Text], env={:Text,Text}): - func from_path(path:Path, args=[:Text], env={:Text,Text} -> Command): +struct Command(command:Text, args=[:Text], env={:Text=Text}): + func from_path(path:Path, args=[:Text], env={:Text=Text} -> Command): return Command(Text(path), args, env) func result(command:Command, input="", input_bytes=[:Byte] -> ProgramResult): -- cgit v1.2.3