Atom -> apply
This commit is contained in:
@@ -23,8 +23,6 @@ use strum::{EnumDiscriminants, EnumIter};
|
||||
|
||||
use crate::prelude::*;
|
||||
|
||||
// TODO: rename all `atom` references to `apply`
|
||||
|
||||
/// Retrieves, but does not parse, all top-level items in a file.
|
||||
// TODO: is `Vec` the most efficient to incrementally update here?
|
||||
#[salsa::tracked]
|
||||
@@ -231,7 +229,7 @@ pub fn expr(db: &dyn Database, ast: AstNode) -> Expr {
|
||||
} else if let Some(var) = ast.get_field(db, "variable") {
|
||||
let name = var.contents(db).to_string();
|
||||
Extra(Arc::new(ExprExtra::VariableName(name)))
|
||||
} else if let Some(ast) = ast.get_field(db, "atom") {
|
||||
} else if let Some(ast) = ast.get_field(db, "apply") {
|
||||
Extra(Arc::new(ExprExtra::Apply(apply(db, ast))))
|
||||
} else if let Some(tuple) = ast.get_field(db, "tuple") {
|
||||
let els = tuple.get_fields(db, "el").map(|el| expr(db, el)).collect();
|
||||
@@ -280,7 +278,7 @@ pub fn aggregate(db: &dyn Database, ast: AstNode) -> Aggregate {
|
||||
.map(|ast| ast.with_contents(db))
|
||||
.collect();
|
||||
|
||||
let body = if let Some(ast) = ast.get_field(db, "atom") {
|
||||
let body = if let Some(ast) = ast.get_field(db, "apply") {
|
||||
AggregateBody::Apply(apply(db, ast))
|
||||
} else {
|
||||
let clauses = ast.get_fields(db, "clause").map(|ast| expr(db, ast));
|
||||
|
||||
Reference in New Issue
Block a user