diff --git a/semantics/cpp/language/common/dynamic.k b/semantics/cpp/language/common/dynamic.k index 6d8fc4947..dc543c453 100644 --- a/semantics/cpp/language/common/dynamic.k +++ b/semantics/cpp/language/common/dynamic.k @@ -898,6 +898,10 @@ module CPP-DYNAMIC-OTHER rule showCPPType(pointerType(T::CPPType)) => showCPPType("", pointerType(T)) + rule showCPPType(lvRefType(T::CPPType)) => showCPPType("", lvRefType(T)) + + rule showCPPType(rvRefType(T::CPPType)) => showCPPType("", rvRefType(T)) + rule showCPPType(classType(N:Namespace :: Class(_, X::CId, .TemplateArgs))) => showNamespace(N) +String showCId(X) @@ -909,6 +913,12 @@ module CPP-DYNAMIC-OTHER rule showCPPType(DDL::String, pointerType(T::CPPType)) => showCPPType(parens(T, "*" +String DDL), simpleType(T)) + rule showCPPType(DDL::String, lvRefType(T::CPPType)) + => showCPPType(parens(T, "&" +String DDL), simpleType(T)) + + rule showCPPType(DDL::String, rvRefType(T::CPPType)) + => showCPPType(parens(T, "&&" +String DDL), simpleType(T)) + rule showCPPType(DDL::String, T::CPPSimpleType) => showCPPType(T) +String " " +String DDL [owise]