@@ -5,7 +5,7 @@ use std::{
5
5
fmt:: { self } ,
6
6
} ;
7
7
// TODO: lisp/scheme js, java?(https://github.com/tanin47/javaparser.rs) php?(https://docs.rs/tagua-parser/0.1.0/tagua_parser/)
8
- use self :: { python:: PythonFunction , ruby:: RubyFunction , rust:: RustFunction } ;
8
+ use self :: { python:: PythonFunction , ruby:: RubyFunction , rust:: RustFunction , umpl :: UMPLFunction } ;
9
9
10
10
// #[cfg(feature = "c_lang")]
11
11
// use self::c::CFunction;
@@ -26,6 +26,8 @@ pub enum Language {
26
26
Go ,
27
27
/// the Ruby language
28
28
Ruby ,
29
+ /// UMPL
30
+ UMPL ,
29
31
/// all available languages
30
32
All ,
31
33
}
@@ -43,6 +45,8 @@ pub enum LanguageFilter {
43
45
Go ( go:: GoFilter ) ,
44
46
/// ruby filter
45
47
Ruby ( ruby:: RubyFilter ) ,
48
+ /// umpl filter
49
+ UMPL ( umpl:: UMPLFilter ) ,
46
50
}
47
51
48
52
impl Language {
@@ -75,10 +79,11 @@ impl Language {
75
79
#[ cfg( feature = "unstable" ) ]
76
80
Self :: Go => "go" ,
77
81
Self :: Ruby => "ruby" ,
82
+ Self :: UMPL => "umpl" ,
78
83
#[ cfg( feature = "unstable" ) ]
79
- Self :: All => "python, rust, go, or ruby " ,
84
+ Self :: All => "python, rust, go, ruby, or umpl " ,
80
85
#[ cfg( not( feature = "unstable" ) ) ]
81
- Self :: All => "python, rust, or ruby " ,
86
+ Self :: All => "python, rust, ruby, or umpl " ,
82
87
}
83
88
}
84
89
@@ -92,10 +97,11 @@ impl Language {
92
97
#[ cfg( feature = "unstable" ) ]
93
98
Self :: Go => & [ "go" ] ,
94
99
Self :: Ruby => & [ "rb" ] ,
100
+ Self :: UMPL => & [ "umpl" ] ,
95
101
#[ cfg( feature = "unstable" ) ]
96
- Self :: All => & [ "py" , "pyw" , "rs" , "go" , "rb" ] ,
102
+ Self :: All => & [ "py" , "pyw" , "rs" , "go" , "rb" , "umpl" ] ,
97
103
#[ cfg( not( feature = "unstable" ) ) ]
98
- Self :: All => & [ "py" , "pyw" , "rs" , "rb" ] ,
104
+ Self :: All => & [ "py" , "pyw" , "rs" , "rb" , "umpl" ] ,
99
105
}
100
106
}
101
107
}
@@ -110,6 +116,7 @@ impl fmt::Display for Language {
110
116
#[ cfg( feature = "unstable" ) ]
111
117
Self :: Go => write ! ( f, "go" ) ,
112
118
Self :: Ruby => write ! ( f, "ruby" ) ,
119
+ Self :: UMPL => write ! ( f, "umpl" ) ,
113
120
Self :: All => write ! ( f, "all" ) ,
114
121
}
115
122
}
@@ -123,6 +130,7 @@ pub mod go;
123
130
pub mod python;
124
131
pub mod ruby;
125
132
pub mod rust;
133
+ pub mod umpl;
126
134
127
135
/// trait that all languages functions must implement
128
136
pub trait FunctionTrait : fmt:: Debug + fmt:: Display {
@@ -324,6 +332,7 @@ make_file!(RustFile, RustFunction, Rust);
324
332
#[ cfg( feature = "unstable" ) ]
325
333
make_file ! ( GoFile , GoFunction , Go ) ;
326
334
make_file ! ( RubyFile , RubyFunction , Ruby ) ;
335
+ make_file ! ( UMPLFile , UMPLFunction , UMPL ) ;
327
336
328
337
#[ cfg( test) ]
329
338
mod lang_tests {
0 commit comments