File tree Expand file tree Collapse file tree 1 file changed +1
-39
lines changed Expand file tree Collapse file tree 1 file changed +1
-39
lines changed Original file line number Diff line number Diff line change @@ -129,44 +129,6 @@ class ASRToLpythonVisitor : public ASR::BaseVisitor<ASRToLpythonVisitor>
129
129
}
130
130
}
131
131
132
- std::string get_type (const ASR::ttype_t *t) {
133
- std::string r = " " ;
134
- switch (t->type ) {
135
- case ASR::ttypeType::Integer : {
136
- r += " i" ;
137
- r += std::to_string (ASRUtils::extract_kind_from_ttype_t (t)*8 );
138
- break ;
139
- } case ASR::ttypeType::Real : {
140
- r += " f" ;
141
- r += std::to_string (ASRUtils::extract_kind_from_ttype_t (t)*8 );
142
- break ;
143
- } case ASR::ttypeType::Complex : {
144
- r += " c" ;
145
- r += std::to_string (ASRUtils::extract_kind_from_ttype_t (t)*8 );
146
- break ;
147
- } case ASR::ttypeType::Character : {
148
- r = " str" ;
149
- break ;
150
- } case ASR::ttypeType::Logical : {
151
- r = " bool" ;
152
- break ;
153
- } case ASR::ttypeType::List : {
154
- r = ASRUtils::type_to_str_python (t);
155
- break ;
156
- } case ASR::ttypeType::Tuple : {
157
- r = ASRUtils::type_to_str_python (t);
158
- break ;
159
- }case ASR::ttypeType::Set : {
160
- r = ASRUtils::type_to_str_python (t);
161
- break ;
162
- } default : {
163
- throw LCompilersException (" The type `"
164
- + ASRUtils::type_to_str_python (t) + " ` is not handled yet" );
165
- }
166
- }
167
- return r;
168
- }
169
-
170
132
void visit_TranslationUnit (const ASR::TranslationUnit_t &x) {
171
133
std::string r = " " ;
172
134
@@ -254,7 +216,7 @@ class ASRToLpythonVisitor : public ASR::BaseVisitor<ASRToLpythonVisitor>
254
216
std::string r = indent;
255
217
r += x.m_name ;
256
218
r += " : " ;
257
- r += get_type (x.m_type );
219
+ r += ASRUtils::type_to_str_python (x.m_type );
258
220
r += " \n " ;
259
221
s = r;
260
222
}
You can’t perform that action at this time.
0 commit comments