Skip to content

Commit 060e3ae

Browse files
author
nicosammito
committed
refactor: replace 'signature' and 'identifier' fields with 'type' in data type and flow type handling
1 parent 3a6347e commit 060e3ae

2 files changed

Lines changed: 8 additions & 8 deletions

File tree

crates/cli/src/analyser/data_type.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,12 +47,12 @@ impl Analyser {
4747
));
4848
}
4949

50-
if dt.signature == "" {
50+
if dt.type == "" {
5151
self.reporter.add(Diagnose::new(
5252
dt.identifier.clone(),
5353
adt.original_definition.clone(),
5454
DiagnosticKind::NullField {
55-
field_name: "signature".into(),
55+
field_name: "type".into(),
5656
},
5757
));
5858
}

crates/cli/src/analyser/flow_type.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -65,26 +65,26 @@ impl Analyser {
6565
));
6666
}
6767

68-
if let Some(identifier) = &flow.input_type_identifier
68+
if let Some(identifier) = &flow.input_type
6969
&& identifier == ""
7070
{
7171
self.reporter.add(Diagnose::new(
7272
name.clone(),
7373
original.clone(),
7474
DiagnosticKind::NullField {
75-
field_name: "input_type_identifier".into(),
75+
field_name: "input_type".into(),
7676
},
7777
));
7878
}
7979

80-
if let Some(identifier) = &flow.return_type_identifier
80+
if let Some(identifier) = &flow.return_type
8181
&& identifier == ""
8282
{
8383
self.reporter.add(Diagnose::new(
8484
name.clone(),
8585
original.clone(),
8686
DiagnosticKind::NullField {
87-
field_name: "return_type_identifier".into(),
87+
field_name: "return_type".into(),
8888
},
8989
));
9090
}
@@ -108,12 +108,12 @@ impl Analyser {
108108
},
109109
));
110110
}
111-
if !self.data_type_identifier_exists(&setting.data_type_identifier, None) {
111+
if !self.data_type_identifier_exists(&setting.type, None) {
112112
self.reporter.add(Diagnose::new(
113113
name.clone(),
114114
original.clone(),
115115
DiagnosticKind::UndefinedDataTypeIdentifier {
116-
identifier: setting.data_type_identifier.clone(),
116+
identifier: setting.type.clone(),
117117
},
118118
));
119119
}

0 commit comments

Comments
 (0)