fix: some updates from latest main

This commit is contained in:
rvcas 2023-02-15 21:13:21 -05:00 committed by Lucas
parent 673b57b81c
commit b057d27465
2 changed files with 3 additions and 7 deletions

View File

@ -9,8 +9,8 @@ use crate::{
Definition, Function, IfBranch, ModuleConstant, Pattern, RecordConstructor, Definition, Function, IfBranch, ModuleConstant, Pattern, RecordConstructor,
RecordConstructorArg, RecordUpdateSpread, Span, TraceKind, TypeAlias, TypedArg, RecordConstructorArg, RecordUpdateSpread, Span, TraceKind, TypeAlias, TypedArg,
TypedConstant, UnOp, UnqualifiedImport, UntypedArg, UntypedClause, UntypedClauseGuard, TypedConstant, UnOp, UnqualifiedImport, UntypedArg, UntypedClause, UntypedClauseGuard,
UntypedDefinition, UntypedModule, UntypedPattern, UntypedRecordUpdateArg, Use, Validator, UntypedDefinition, UntypedFunction, UntypedModule, UntypedPattern, UntypedRecordUpdateArg,
CAPTURE_VARIABLE, Use, Validator, CAPTURE_VARIABLE,
}, },
docvec, docvec,
expr::{UntypedExpr, DEFAULT_ERROR_STR, DEFAULT_TODO_STR}, expr::{UntypedExpr, DEFAULT_ERROR_STR, DEFAULT_TODO_STR},

View File

@ -262,11 +262,7 @@ pub fn validator_parser() -> impl Parser<Token, ast::UntypedDefinition, Error =
.map_with_span( .map_with_span(
|(((arguments, args_span), return_annotation), body), span| ast::Function { |(((arguments, args_span), return_annotation), body), span| ast::Function {
arguments, arguments,
body: body.unwrap_or(expr::UntypedExpr::Todo { body: body.unwrap_or_else(|| expr::UntypedExpr::todo(span, None)),
kind: TodoKind::EmptyFunction,
location: span,
label: None,
}),
doc: None, doc: None,
location: Span { location: Span {
start: span.start, start: span.start,