diff options
author | Griffin Smith <root@gws.fyi> | 2021-03-14T15·53-0400 |
---|---|---|
committer | Griffin Smith <root@gws.fyi> | 2021-03-14T15·53-0400 |
commit | 39656a3801bb311edd9ebb65e92a24fc48f69ec7 (patch) | |
tree | d408937901c7789c033373019a94e014a03522a8 /src/parser/type_.rs | |
parent | 32a5c0ff0fc58aa6721c1e0ad41950bde2d66744 (diff) |
Add string support to the frontend
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] |