diff options
Diffstat (limited to 'src/parser/type_.rs')
-rw-r--r-- | src/parser/type_.rs | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/parser/type_.rs b/src/parser/type_.rs index 076df7d6bd55..66b4f9f72c23 100644 --- a/src/parser/type_.rs +++ b/src/parser/type_.rs @@ -27,6 +27,7 @@ named!(pub type_(&str) -> Type, alt!( tag!("int") => { |_| Type::Int } | tag!("float") => { |_| Type::Float } | tag!("bool") => { |_| Type::Bool } | + tag!("cstring") => { |_| Type::CString } | function_type | delimited!( tuple!(tag!("("), multispace0), @@ -44,6 +45,7 @@ mod tests { assert_eq!(test_parse!(type_, "int"), Type::Int); assert_eq!(test_parse!(type_, "float"), Type::Float); assert_eq!(test_parse!(type_, "bool"), Type::Bool); + assert_eq!(test_parse!(type_, "cstring"), Type::CString); } #[test] |