⭐️ A friendly language for building type-safe, scalable systems!
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Fix codegen of assert on erlang

authored by gearsco.de and committed by

Louis Pilfold dd67180b 1394774a

+26 -22
+2 -2
compiler-core/src/erlang.rs
··· 2525 2525 start, 2526 2526 ",", 2527 2527 line(), 2528 - "end => ", 2528 + // `end` is a keyword in Erlang, so we have to quote it 2529 + "'end' => ", 2529 2530 end, 2530 - ",", 2531 2531 line(), 2532 2532 ]; 2533 2533
+2 -2
compiler-core/src/erlang/tests/snapshots/gleam_core__erlang__tests__assert__assert_binary_operation.snap
··· 29 29 left => #{kind => expression, 30 30 value => false, 31 31 start => 41, 32 - end => 42, 32 + 'end' => 42 33 33 }, 34 34 right => #{kind => expression, 35 35 value => false, 36 36 start => 46, 37 - end => 51, 37 + 'end' => 51 38 38 }, 39 39 module => <<"my/mod"/utf8>>, 40 40 function => <<"main"/utf8>>,
+2 -2
compiler-core/src/erlang/tests/snapshots/gleam_core__erlang__tests__assert__assert_binary_operation2.snap
··· 27 27 left => #{kind => expression, 28 28 value => A, 29 29 start => 28, 30 - end => 29, 30 + 'end' => 29 31 31 }, 32 32 right => #{kind => expression, 33 33 value => B, 34 34 start => 33, 35 - end => 34, 35 + 'end' => 34 36 36 }, 37 37 module => <<"my/mod"/utf8>>, 38 38 function => <<"eq"/utf8>>,
+2 -2
compiler-core/src/erlang/tests/snapshots/gleam_core__erlang__tests__assert__assert_binary_operation3.snap
··· 28 28 left => #{kind => expression, 29 29 value => X, 30 30 start => 36, 31 - end => 37, 31 + 'end' => 37 32 32 }, 33 33 right => #{kind => literal, 34 34 value => _assert_subject, 35 35 start => 41, 36 - end => 43, 36 + 'end' => 43 37 37 }, 38 38 module => <<"my/mod"/utf8>>, 39 39 function => <<"assert_answer"/utf8>>,
+4 -4
compiler-core/src/erlang/tests/snapshots/gleam_core__erlang__tests__assert__assert_binary_operator_with_side_effects.snap
··· 39 39 left => #{kind => expression, 40 40 value => true, 41 41 start => 82, 42 - end => 86, 42 + 'end' => 86 43 43 }, 44 44 right => #{kind => expression, 45 45 value => false, 46 46 start => 90, 47 - end => 102, 47 + 'end' => 102 48 48 }, 49 49 module => <<"my/mod"/utf8>>, 50 50 function => <<"go"/utf8>>, ··· 57 57 left => #{kind => expression, 58 58 value => false, 59 59 start => 82, 60 - end => 86, 60 + 'end' => 86 61 61 }, 62 62 right => #{kind => unevaluated, 63 63 start => 90, 64 - end => 102, 64 + 'end' => 102 65 65 }, 66 66 module => <<"my/mod"/utf8>>, 67 67 function => <<"go"/utf8>>,
+4 -4
compiler-core/src/erlang/tests/snapshots/gleam_core__erlang__tests__assert__assert_binary_operator_with_side_effects2.snap
··· 39 39 left => #{kind => expression, 40 40 value => true, 41 41 start => 82, 42 - end => 94, 42 + 'end' => 94 43 43 }, 44 44 right => #{kind => expression, 45 45 value => false, 46 46 start => 98, 47 - end => 110, 47 + 'end' => 110 48 48 }, 49 49 module => <<"my/mod"/utf8>>, 50 50 function => <<"go"/utf8>>, ··· 57 57 left => #{kind => expression, 58 58 value => false, 59 59 start => 82, 60 - end => 94, 60 + 'end' => 94 61 61 }, 62 62 right => #{kind => unevaluated, 63 63 start => 98, 64 - end => 110, 64 + 'end' => 110 65 65 }, 66 66 module => <<"my/mod"/utf8>>, 67 67 function => <<"go"/utf8>>,
+2 -2
compiler-core/src/erlang/tests/snapshots/gleam_core__erlang__tests__assert__assert_function_call2.snap
··· 35 35 arguments => [#{kind => expression, 36 36 value => true, 37 37 start => 56, 38 - end => 60, 38 + 'end' => 60 39 39 }, #{kind => expression, 40 40 value => X, 41 41 start => 62, 42 - end => 63, 42 + 'end' => 63 43 43 }], 44 44 module => <<"my/mod"/utf8>>, 45 45 function => <<"go"/utf8>>,
+1 -1
compiler-core/src/erlang/tests/snapshots/gleam_core__erlang__tests__assert__assert_literal.snap
··· 26 26 expression => #{kind => expression, 27 27 value => false, 28 28 start => 26, 29 - end => 31, 29 + 'end' => 31 30 30 }, 31 31 module => <<"my/mod"/utf8>>, 32 32 function => <<"main"/utf8>>,
+1 -1
compiler-core/src/erlang/tests/snapshots/gleam_core__erlang__tests__assert__assert_variable.snap
··· 28 28 expression => #{kind => expression, 29 29 value => false, 30 30 start => 41, 31 - end => 42, 31 + 'end' => 42 32 32 }, 33 33 module => <<"my/mod"/utf8>>, 34 34 function => <<"main"/utf8>>,
+1 -1
compiler-core/src/erlang/tests/snapshots/gleam_core__erlang__tests__assert__assert_with_block_message.snap
··· 41 41 arguments => [#{kind => expression, 42 42 value => true, 43 43 start => 59, 44 - end => 63, 44 + 'end' => 63 45 45 }], 46 46 module => <<"my/mod"/utf8>>, 47 47 function => <<"main"/utf8>>,
+1 -1
compiler-core/src/erlang/tests/snapshots/gleam_core__erlang__tests__assert__assert_with_message.snap
··· 26 26 expression => #{kind => expression, 27 27 value => false, 28 28 start => 26, 29 - end => 30, 29 + 'end' => 30 30 30 }, 31 31 module => <<"my/mod"/utf8>>, 32 32 function => <<"main"/utf8>>,
+4
compiler-core/src/parse/snapshots/gleam_core__parse__tests__assert_statement.snap
··· 15 15 end: 15, 16 16 }, 17 17 name: NotEq, 18 + name_location: SrcSpan { 19 + start: 10, 20 + end: 12, 21 + }, 18 22 left: Int { 19 23 location: SrcSpan { 20 24 start: 7,