Fork of daniellemaywood.uk/gleam — Wasm codegen work
2

Configure Feed

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

Add source code to one more snapshot case

+84 -2
+7
compiler-core/src/parse/snapshots/gleam_core__parse__tests__argument_scope.snap
··· 2 2 source: compiler-core/src/parse/tests.rs 3 3 expression: "\n1 + let a = 5\na\n" 4 4 --- 5 + ----- SOURCE CODE 6 + 7 + 1 + let a = 5 8 + a 9 + 10 + 11 + ----- ERROR 5 12 error: Syntax error 6 13 ┌─ /src/parse/error.gleam:2:3 7 14
+8
compiler-core/src/parse/snapshots/gleam_core__parse__tests__assign_left_hand_side_of_concat_pattern.snap
··· 2 2 source: compiler-core/src/parse/tests.rs 3 3 expression: "\n case \"\" {\n first <> rest -> rest\n }\n " 4 4 --- 5 + ----- SOURCE CODE 6 + 7 + case "" { 8 + first <> rest -> rest 9 + } 10 + 11 + 12 + ----- ERROR 5 13 error: Syntax error 6 14 ┌─ /src/parse/error.gleam:3:11 7 15
+8
compiler-core/src/parse/snapshots/gleam_core__parse__tests__discard_left_hand_side_of_concat_pattern.snap
··· 2 2 source: compiler-core/src/parse/tests.rs 3 3 expression: "\n case \"\" {\n _ <> rest -> rest\n }\n " 4 4 --- 5 + ----- SOURCE CODE 6 + 7 + case "" { 8 + _ <> rest -> rest 9 + } 10 + 11 + 12 + ----- ERROR 5 13 error: Syntax error 6 14 ┌─ /src/parse/error.gleam:3:11 7 15
+8
compiler-core/src/parse/snapshots/gleam_core__parse__tests__dot_access_function_call_in_case_clause_guard.snap
··· 2 2 source: compiler-core/src/parse/tests.rs 3 3 expression: "\nlet my_string = \"hello\"\ncase my_string {\n _ if string.length(my_string) > 2 -> io.debug(\"doesn't work')\n}" 4 4 --- 5 + ----- SOURCE CODE 6 + 7 + let my_string = "hello" 8 + case my_string { 9 + _ if string.length(my_string) > 2 -> io.debug("doesn't work') 10 + } 11 + 12 + ----- ERROR 5 13 error: Syntax error 6 14 ┌─ /src/parse/error.gleam:4:10 7 15
+8
compiler-core/src/parse/snapshots/gleam_core__parse__tests__function_call_in_case_clause_guard.snap
··· 2 2 source: compiler-core/src/parse/tests.rs 3 3 expression: "\nlet my_string = \"hello\"\ncase my_string {\n _ if length(my_string) > 2 -> io.debug(\"doesn't work')\n}" 4 4 --- 5 + ----- SOURCE CODE 6 + 7 + let my_string = "hello" 8 + case my_string { 9 + _ if length(my_string) > 2 -> io.debug("doesn't work') 10 + } 11 + 12 + ----- ERROR 5 13 error: Syntax error 6 14 ┌─ /src/parse/error.gleam:4:10 7 15
+4
compiler-core/src/parse/snapshots/gleam_core__parse__tests__incomplete_function.snap
··· 2 2 source: compiler-core/src/parse/tests.rs 3 3 expression: fn() 4 4 --- 5 + ----- SOURCE CODE 6 + fn() 7 + 8 + ----- ERROR 5 9 error: Syntax error 6 10 ┌─ /src/parse/error.gleam:1:1 7 11
+8
compiler-core/src/parse/snapshots/gleam_core__parse__tests__invalid_left_paren_in_case_clause_guard.snap
··· 2 2 source: compiler-core/src/parse/tests.rs 3 3 expression: "\nlet my_string = \"hello\"\ncase my_string {\n _ if string.length( > 2 -> io.debug(\"doesn't work')\n}" 4 4 --- 5 + ----- SOURCE CODE 6 + 7 + let my_string = "hello" 8 + case my_string { 9 + _ if string.length( > 2 -> io.debug("doesn't work') 10 + } 11 + 12 + ----- ERROR 5 13 error: Syntax error 6 14 ┌─ /src/parse/error.gleam:4:23 7 15
+4
compiler-core/src/parse/snapshots/gleam_core__parse__tests__no_eq_after_binding_snapshot_1.snap
··· 2 2 source: compiler-core/src/parse/tests.rs 3 3 expression: let wibble 4 4 --- 5 + ----- SOURCE CODE 6 + let wibble 7 + 8 + ----- ERROR 5 9 error: Syntax error 6 10 ┌─ /src/parse/error.gleam:1:5 7 11
+5
compiler-core/src/parse/snapshots/gleam_core__parse__tests__no_eq_after_binding_snapshot_2.snap
··· 2 2 source: compiler-core/src/parse/tests.rs 3 3 expression: "let wibble\n wibble = 4" 4 4 --- 5 + ----- SOURCE CODE 6 + let wibble 7 + wibble = 4 8 + 9 + ----- ERROR 5 10 error: Syntax error 6 11 ┌─ /src/parse/error.gleam:1:5 7 12
+4
compiler-core/src/parse/snapshots/gleam_core__parse__tests__no_let_binding_snapshot_1.snap
··· 2 2 source: compiler-core/src/parse/tests.rs 3 3 expression: wibble = 4 4 4 --- 5 + ----- SOURCE CODE 6 + wibble = 4 7 + 8 + ----- ERROR 5 9 error: Syntax error 6 10 ┌─ /src/parse/error.gleam:1:8 7 11
+4
compiler-core/src/parse/snapshots/gleam_core__parse__tests__no_let_binding_snapshot_2.snap
··· 2 2 source: compiler-core/src/parse/tests.rs 3 3 expression: "wibble:Int = 4" 4 4 --- 5 + ----- SOURCE CODE 6 + wibble:Int = 4 7 + 8 + ----- ERROR 5 9 error: Syntax error 6 10 ┌─ /src/parse/error.gleam:1:7 7 11
+5
compiler-core/src/parse/snapshots/gleam_core__parse__tests__no_let_binding_snapshot_3.snap
··· 2 2 source: compiler-core/src/parse/tests.rs 3 3 expression: "let wobble:Int = 32\n wobble = 42" 4 4 --- 5 + ----- SOURCE CODE 6 + let wobble:Int = 32 7 + wobble = 42 8 + 9 + ----- ERROR 5 10 error: Syntax error 6 11 ┌─ /src/parse/error.gleam:2:16 7 12
+4
compiler-core/src/parse/snapshots/gleam_core__parse__tests__semicolons.snap
··· 2 2 source: compiler-core/src/parse/tests.rs 3 3 expression: "{ 2 + 3; - -5; }" 4 4 --- 5 + ----- SOURCE CODE 6 + { 2 + 3; - -5; } 7 + 8 + ----- ERROR 5 9 error: Syntax error 6 10 ┌─ /src/parse/error.gleam:1:8 7 11
+4
compiler-core/src/parse/snapshots/gleam_core__parse__tests__valueless_list_spread_expression.snap
··· 2 2 source: compiler-core/src/parse/tests.rs 3 3 expression: "let x = [1, 2, 3, ..]" 4 4 --- 5 + ----- SOURCE CODE 6 + let x = [1, 2, 3, ..] 7 + 8 + ----- ERROR 5 9 error: Syntax error 6 10 ┌─ /src/parse/error.gleam:1:19 7 11
+3 -2
compiler-core/src/parse/tests.rs
··· 17 17 assert_eq!(($src, $error), ($src, result),); 18 18 }; 19 19 ($src:expr) => { 20 - let result = $crate::parse::tests::expect_error($src); 21 - insta::assert_snapshot!(insta::internals::AutoName, result, $src); 20 + let error = $crate::parse::tests::expect_error($src); 21 + let output = format!("----- SOURCE CODE\n{}\n\n----- ERROR\n{}", $src, error); 22 + insta::assert_snapshot!(insta::internals::AutoName, output, $src); 22 23 }; 23 24 } 24 25