mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-26 13:29:12 +00:00
cleanup, improve docs
This commit is contained in:
parent
c32fa5b600
commit
0143035dc0
8 changed files with 42 additions and 60 deletions
|
@ -212,7 +212,6 @@ fn generate_entry_docs(
|
|||
match either_index.split() {
|
||||
Err(value_index) => match &defs.value_defs[value_index.index()] {
|
||||
ValueDef::Annotation(loc_pattern, loc_ann) => {
|
||||
// TODO is this right for suffixed??
|
||||
if let Pattern::Identifier {
|
||||
ident: identifier,
|
||||
suffixed: _,
|
||||
|
@ -238,7 +237,6 @@ fn generate_entry_docs(
|
|||
ann_type,
|
||||
..
|
||||
} => {
|
||||
// TODO is this right for suffixed??
|
||||
if let Pattern::Identifier {
|
||||
ident: identifier,
|
||||
suffixed: _,
|
||||
|
@ -259,7 +257,6 @@ fn generate_entry_docs(
|
|||
}
|
||||
|
||||
ValueDef::Body(pattern, _) => {
|
||||
// TODO is this right for suffixed??
|
||||
if let Pattern::Identifier {
|
||||
ident: identifier,
|
||||
suffixed: _,
|
||||
|
@ -292,7 +289,6 @@ fn generate_entry_docs(
|
|||
}
|
||||
|
||||
ValueDef::Stmt(loc_expr) => {
|
||||
// TODO is this right for suffixed??
|
||||
if let roc_parse::ast::Expr::Var {
|
||||
ident: identifier, ..
|
||||
} = loc_expr.value
|
||||
|
@ -320,7 +316,6 @@ fn generate_entry_docs(
|
|||
let mut type_vars = Vec::new();
|
||||
|
||||
for var in vars.iter() {
|
||||
// TODO is this right for suffixed??
|
||||
if let Pattern::Identifier {
|
||||
ident: ident_name,
|
||||
suffixed: _,
|
||||
|
@ -359,7 +354,6 @@ fn generate_entry_docs(
|
|||
let mut type_vars = Vec::new();
|
||||
|
||||
for var in vars.iter() {
|
||||
// TODO is this right for suffixed??
|
||||
if let Pattern::Identifier {
|
||||
ident: ident_name,
|
||||
suffixed: _,
|
||||
|
@ -388,7 +382,6 @@ fn generate_entry_docs(
|
|||
let mut type_vars = Vec::new();
|
||||
|
||||
for var in vars.iter() {
|
||||
// TODO is this right for suffixed??
|
||||
if let Pattern::Identifier {
|
||||
ident: ident_name,
|
||||
suffixed: _,
|
||||
|
@ -655,7 +648,6 @@ fn type_to_docs(in_func_type_ann: bool, type_annotation: ast::TypeAnnotation) ->
|
|||
.vars
|
||||
.iter()
|
||||
.filter_map(|loc_pattern| match loc_pattern.value {
|
||||
// TODO is this right for suffixed??
|
||||
ast::Pattern::Identifier { ident, suffixed: _ } => Some(ident.to_string()),
|
||||
_ => None,
|
||||
})
|
||||
|
|
|
@ -5985,11 +5985,6 @@ fn build_pending_specializations<'a>(
|
|||
// this seems to work for now
|
||||
*shadowed
|
||||
}
|
||||
Pattern::RecordDestructure { .. } => {
|
||||
// this seems to work for now, we added to enable suffixed expressions
|
||||
// the issue is likely that we can have a `main = say! "hi"` which is
|
||||
symbol
|
||||
}
|
||||
_ => todo!("top-level destrucuture patterns are not implemented"),
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue