Rename grammar "definition" to "relation"
This commit is contained in:
@@ -50,7 +50,7 @@ pub fn items<'db>(db: &'db dyn Database, file: workspace::File) -> Vec<ItemMeta<
|
||||
// otherwise, convert the symbol directly into the item kind
|
||||
"type_alias" => ItemKind::TypeAlias,
|
||||
"import" => ItemKind::Import,
|
||||
"definition" => ItemKind::Relation, // TODO: rename grammar node
|
||||
"relation" => ItemKind::Relation,
|
||||
"rule" => ItemKind::Rule,
|
||||
"assumption" => ItemKind::Assumption,
|
||||
|
||||
@@ -115,7 +115,7 @@ pub enum Item<'db> {
|
||||
/// Parses [Relation] from an [AstNode].
|
||||
#[salsa::tracked]
|
||||
pub fn relation<'db>(db: &'db dyn Database, ast: AstNode) -> Relation<'db> {
|
||||
let name = ast.expect_field(db, "relation").with_contents(db);
|
||||
let name = ast.expect_field(db, "name").with_contents(db);
|
||||
let is_decision = ast.get_field(db, "decision").is_some();
|
||||
let ty = ty(db, ast.expect_field(db, "type"));
|
||||
Relation::new(db, name, is_decision, ty)
|
||||
|
||||
Reference in New Issue
Block a user