diff --git a/possible_syntax.lapis b/possible_syntax.lapis index 7632a63..57e3ca9 100644 --- a/possible_syntax.lapis +++ b/possible_syntax.lapis @@ -1,7 +1,7 @@ include("std.print") # external print implementation ex ## -print ( fmt : (compexpr | string) , values : any ... ) -> void { +print ( fmt : (compexpr | string) , values : any ... ) : void { last_n : int = 0 @@ -14,9 +14,9 @@ print ( fmt : (compexpr | string) , values : any ... ) -> void { putstr( stdout, fmt[last_n : n] ) switch (value) { - default: break - case (int) -> putstr( stdout, to_str_from_int( int(value) ) ) - ... + default : break + case (int) : putstr( stdout, to_str_from_int( int(value) ) ) + case (float) : putstr( stdout, to_str_from_float( int(value) ) ) } last_n = n @@ -26,7 +26,7 @@ print ( fmt : (compexpr | string) , values : any ... ) -> void { -test_func ( x : int , y : int ) -> int { +test_func ( x : int , y : int ) : int { return ( x * y ); }; @@ -38,7 +38,7 @@ if ( x > 0 ) { print( "as expected; x = %\n" , x ) } -main ( argc : int , argv : string[_] ) -> int { +main ( argc : int , argv : string[_] ) : int { return (0); }