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

Remove unused error variants

authored by giacomocavalieri.me and committed by Louis Pilfold 66223aad 33315d5b

Changed files
-9
compiler-core
src
parse
-9
compiler-core/src/parse/error.rs
··· 49 49 ), 50 50 ParseErrorType::ExpectedUpName => ("I was expecting a type name here", vec![]), 51 51 ParseErrorType::ExpectedValue => ("I was expecting a value after this", vec![]), 52 - ParseErrorType::ExpectedStatement => ("I was expecting a statement after this", vec![]), 53 52 ParseErrorType::ExpectedDefinition => { 54 53 ("I was expecting a definition after this", vec![]) 55 54 } ··· 122 121 ParseErrorType::NotConstType => ( 123 122 "This type is not allowed in module constants", 124 123 vec!["See: https://tour.gleam.run/basics/constants/".into()], 125 - ), 126 - ParseErrorType::NoExpression => ( 127 - "There must be an expression in here", 128 - vec!["Hint: Put an expression in there or remove the brackets.".into()], 129 124 ), 130 125 ParseErrorType::NoLetBinding => ( 131 126 "There must be a 'let' to bind variable to value", ··· 231 226 232 227 ("I was not expecting this", messages) 233 228 } 234 - ParseErrorType::ExpectedBoolean => ("Did you mean to negate a boolean?", vec![]), 235 229 ParseErrorType::ConcatPatternVariableLeftHandSide => ( 236 230 "This must be a string literal", 237 231 vec![ ··· 368 362 ExpectedType, // after ':' or '->' where a type annotation is expected 369 363 ExpectedUpName, // any token used when a UpName was expected 370 364 ExpectedValue, // no value after "=" 371 - ExpectedStatement, // no statement after "@<name>" 372 365 ExpectedDefinition, // after attributes 373 366 ExpectedDeprecationMessage, // after "deprecated" 374 367 ExpectedFunctionDefinition, // after function-only attributes ··· 385 378 error: LexicalError, 386 379 }, 387 380 NestedBitArrayPattern, // <<<<1>>, 2>>, <<1>> is not allowed in there 388 - NoExpression, // between "{" and "}" in expression position, there must be an expression 389 381 NoLetBinding, // Bindings and rebinds always require let and must always bind to a value. 390 382 NoValueAfterEqual, // = <something other than a value> 391 383 NotConstType, // :fn(), name, _ are not valid const types ··· 407 399 expected: Vec<EcoString>, 408 400 hint: Option<EcoString>, 409 401 }, 410 - ExpectedBoolean, 411 402 UnexpectedFunction, // a function was used called outside of another function 412 403 // A variable was assigned or discarded on the left hand side of a <> pattern 413 404 ConcatPatternVariableLeftHandSide,