[vala/staging: 2/22] libvaladoc: Replace FormalParameterType with Vala.ParameterDirection
- From: Rico Tzschichholz <ricotz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vala/staging: 2/22] libvaladoc: Replace FormalParameterType with Vala.ParameterDirection
- Date: Sun, 25 Nov 2018 13:08:16 +0000 (UTC)
commit 7b2b429734b61d5ef185204e0a11f0abdad2bdeb
Author: Rico Tzschichholz <ricotz ubuntu com>
Date: Tue Jun 12 12:46:48 2018 +0200
libvaladoc: Replace FormalParameterType with Vala.ParameterDirection
libvaladoc/Makefile.am | 1 -
libvaladoc/api/formalparameter.vala | 8 +++---
libvaladoc/api/formalparametertype.vala | 44 ---------------------------------
valadoc/treebuilder.vala | 14 +----------
4 files changed, 5 insertions(+), 62 deletions(-)
---
diff --git a/libvaladoc/Makefile.am b/libvaladoc/Makefile.am
index f3f790e76..c35ebfc3e 100644
--- a/libvaladoc/Makefile.am
+++ b/libvaladoc/Makefile.am
@@ -70,7 +70,6 @@ libvaladoc_la_VALASOURCES = \
api/errordomain.vala \
api/field.vala \
api/formalparameter.vala \
- api/formalparametertype.vala \
api/interface.vala \
api/item.vala \
api/member.vala \
diff --git a/libvaladoc/api/formalparameter.vala b/libvaladoc/api/formalparameter.vala
index 6bbbc37df..6b572b211 100644
--- a/libvaladoc/api/formalparameter.vala
+++ b/libvaladoc/api/formalparameter.vala
@@ -56,9 +56,9 @@ public class Valadoc.Api.FormalParameter : Symbol {
set;
}
- private FormalParameterType type;
+ private Vala.ParameterDirection type;
- public FormalParameter (Node parent, SourceFile file, string? name, SymbolAccessibility
accessibility, FormalParameterType type, bool ellipsis, Vala.Parameter data) {
+ public FormalParameter (Node parent, SourceFile file, string? name, SymbolAccessibility
accessibility, Vala.ParameterDirection type, bool ellipsis, Vala.Parameter data) {
base (parent, file, name, accessibility, data);
assert ((name == null && ellipsis) || (name != null && !ellipsis));
@@ -71,7 +71,7 @@ public class Valadoc.Api.FormalParameter : Symbol {
*/
public bool is_out {
get {
- return type == FormalParameterType.OUT;
+ return type == Vala.ParameterDirection.OUT;
}
}
@@ -80,7 +80,7 @@ public class Valadoc.Api.FormalParameter : Symbol {
*/
public bool is_ref {
get {
- return type == FormalParameterType.REF;
+ return type == Vala.ParameterDirection.REF;
}
}
diff --git a/valadoc/treebuilder.vala b/valadoc/treebuilder.vala
index 7c35905dc..003a61027 100644
--- a/valadoc/treebuilder.vala
+++ b/valadoc/treebuilder.vala
@@ -720,18 +720,6 @@ public class Valadoc.Drivers.TreeBuilder : Vala.CodeVisitor {
return PropertyBindingType.UNMODIFIED;
}
- private FormalParameterType get_formal_parameter_type (Vala.Parameter element) {
- if (element.direction == Vala.ParameterDirection.OUT) {
- return FormalParameterType.OUT;
- } else if (element.direction == Vala.ParameterDirection.REF) {
- return FormalParameterType.REF;
- } else if (element.direction == Vala.ParameterDirection.IN) {
- return FormalParameterType.IN;
- }
-
- error ("Unknown formal parameter type");
- }
-
//
// Vala tree creation:
@@ -1453,7 +1441,7 @@ public class Valadoc.Drivers.TreeBuilder : Vala.CodeVisitor {
file,
element.name,
get_access_modifier(element),
-
get_formal_parameter_type (element),
+
element.direction,
element.ellipsis,
element);
node.parameter_type = create_type_reference (element.variable_type, node, node);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]