~repos /plum
git clone https://pyrossh.dev/repos/plum.git
A statically typed, imperative programming language inspired by rust, python
tooling/tree-sitter-plum/test/corpus/function.txt
================================================================================function - no return================================================================================
sum(a: Int, b: Int) = todo
--------------------------------------------------------------------------------
(source (fn (fn_identifier) (param (var_identifier) (type (type_identifier))) (param (var_identifier) (type (type_identifier))) (body (todo))))
================================================================================function - return================================================================================
sum(a: Int, b: Int) -> Int = todo
--------------------------------------------------------------------------------
(source (fn (fn_identifier) (param (var_identifier) (type (type_identifier))) (param (var_identifier) (type (type_identifier))) (return_type (type_identifier)) (body (todo))))
================================================================================function - default value================================================================================
random(a: Int = 10) = todo
--------------------------------------------------------------------------------
(source (fn (fn_identifier) (param (var_identifier) (type (type_identifier)) (expression (primary_expression (integer)))) (body (todo))))
================================================================================function - generics================================================================================
add(param: a, param2: List(b)) -> List(b) = todo
--------------------------------------------------------------------------------
(source (fn (fn_identifier) (param (var_identifier) (type (a))) (param (var_identifier) (type (type_identifier) (type (b)))) (return_type (type_identifier) (generics (b))) (body (todo))))
================================================================================function - method================================================================================
fullname<User>() -> String = todo
--------------------------------------------------------------------------------
(source (fn (fn_identifier) (type (type_identifier)) (return_type (type_identifier)) (body (todo))))