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

Configure Feed

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

removed empty check in parser and unused ParseErrorType::NoCaseClause

-7
-2
compiler-core/src/parse.rs
··· 628 628 ParseErrorType::ExpectedExpr, 629 629 SrcSpan { start, end: case_e }, 630 630 ); 631 - } else if clauses.is_empty() { 632 - return parse_error(ParseErrorType::NoCaseClause, SrcSpan { start, end }); 633 631 } else { 634 632 UntypedExpr::Case { 635 633 location: SrcSpan { start, end },
-5
compiler-core/src/parse/error.rs
··· 110 110 ), 111 111 ParseErrorType::LexError { error: lex_err } => lex_err.to_parse_error_info(), 112 112 ParseErrorType::NestedBitArrayPattern => ("BitArray patterns cannot be nested", vec![]), 113 - ParseErrorType::NoCaseClause => ( 114 - "This case expression has no clauses", 115 - vec!["See: https://tour.gleam.run/flow-control/case-expressions/".into()], 116 - ), 117 113 ParseErrorType::NotConstType => ( 118 114 "This type is not allowed in module constants", 119 115 vec!["See: https://tour.gleam.run/basics/constants/".into()], ··· 263 259 error: LexicalError, 264 260 }, 265 261 NestedBitArrayPattern, // <<<<1>>, 2>>, <<1>> is not allowed in there 266 - NoCaseClause, // a case with no clauses 267 262 NoExpression, // between "{" and "}" in expression position, there must be an expression 268 263 NoLetBinding, // Bindings and rebinds always require let and must always bind to a value. 269 264 NoValueAfterEqual, // = <something other than a value>