|
|
|
|
@ -762,86 +762,6 @@ fn trial(x, y, z) {
|
|
|
|
|
value: (record
|
|
|
|
|
name: (constructor_name))))))))
|
|
|
|
|
|
|
|
|
|
================================================================================
|
|
|
|
|
Try patterns
|
|
|
|
|
================================================================================
|
|
|
|
|
|
|
|
|
|
fn try_try_again(x, y) -> Int {
|
|
|
|
|
try int_x = todo
|
|
|
|
|
try _who_cares = todo
|
|
|
|
|
try file.IODevice() = todo
|
|
|
|
|
try Node = todo
|
|
|
|
|
try "hello" = todo
|
|
|
|
|
try 1 = todo
|
|
|
|
|
try 12.34 = todo
|
|
|
|
|
try #(a, b) = todo
|
|
|
|
|
try <<a:utf8, b:size(8)>> = todo
|
|
|
|
|
try [a, b] = todo
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
--------------------------------------------------------------------------------
|
|
|
|
|
|
|
|
|
|
(source_file
|
|
|
|
|
(function
|
|
|
|
|
name: (identifier)
|
|
|
|
|
parameters: (function_parameters
|
|
|
|
|
(function_parameter
|
|
|
|
|
name: (identifier))
|
|
|
|
|
(function_parameter
|
|
|
|
|
name: (identifier)))
|
|
|
|
|
return_type: (type
|
|
|
|
|
name: (type_identifier))
|
|
|
|
|
body: (function_body
|
|
|
|
|
(try
|
|
|
|
|
pattern: (identifier)
|
|
|
|
|
value: (todo))
|
|
|
|
|
(try
|
|
|
|
|
pattern: (discard)
|
|
|
|
|
value: (todo))
|
|
|
|
|
(try
|
|
|
|
|
pattern: (record_pattern
|
|
|
|
|
name: (remote_constructor_name
|
|
|
|
|
module: (identifier)
|
|
|
|
|
name: (constructor_name))
|
|
|
|
|
arguments: (record_pattern_arguments))
|
|
|
|
|
value: (todo))
|
|
|
|
|
(try
|
|
|
|
|
pattern: (record_pattern
|
|
|
|
|
name: (constructor_name))
|
|
|
|
|
value: (todo))
|
|
|
|
|
(try
|
|
|
|
|
pattern: (string
|
|
|
|
|
(quoted_content))
|
|
|
|
|
value: (todo))
|
|
|
|
|
(try
|
|
|
|
|
pattern: (integer)
|
|
|
|
|
value: (todo))
|
|
|
|
|
(try
|
|
|
|
|
pattern: (float)
|
|
|
|
|
value: (todo))
|
|
|
|
|
(try
|
|
|
|
|
pattern: (tuple_pattern
|
|
|
|
|
(identifier)
|
|
|
|
|
(identifier))
|
|
|
|
|
value: (todo))
|
|
|
|
|
(try
|
|
|
|
|
pattern: (bit_string_pattern
|
|
|
|
|
(bit_string_segment
|
|
|
|
|
value: (identifier)
|
|
|
|
|
options: (bit_string_segment_options
|
|
|
|
|
(bit_string_segment_option)))
|
|
|
|
|
(bit_string_segment
|
|
|
|
|
value: (identifier)
|
|
|
|
|
options: (bit_string_segment_options
|
|
|
|
|
(bit_string_segment_option
|
|
|
|
|
(integer)))))
|
|
|
|
|
value: (todo))
|
|
|
|
|
(try
|
|
|
|
|
pattern: (list_pattern
|
|
|
|
|
(identifier)
|
|
|
|
|
(identifier))
|
|
|
|
|
value: (todo)))))
|
|
|
|
|
|
|
|
|
|
================================================================================
|
|
|
|
|
Let expressions
|
|
|
|
|
================================================================================
|
|
|
|
|
|