Helper functions for signature parser AST building.
Summary
Functions
Build full signature from parameters and return type.
Build a map field (key :type).
Build a map type wrapper.
Build a parameter (name :type).
Build shorthand signature (no input, just output).
Build a type from primitive type keyword and optional suffix.
Concatenate identifier parts (first char + optional rest).
Flatten lists from repeat parsing.
Build a list type wrapper.
Functions
Build full signature from parameters and return type.
When optional(parsec(:parameters_list)) doesn't match, we get just [return_type]. When it does match, we get [params, return_type].
Build a map field (key :type).
Build a map type wrapper.
Build a parameter (name :type).
Build shorthand signature (no input, just output).
Build a type from primitive type keyword and optional suffix.
Concatenate identifier parts (first char + optional rest).
Flatten lists from repeat parsing.
When parsing with repeat(), we get [first_result, [rest_result_1, rest_result_2, ...]] This returns [first_result, rest_result_1, rest_result_2, ...]
Build a list type wrapper.