aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorPhilip Herron <philip.herron@embecosm.com>2021-02-11 13:57:36 +0000
committerPhilip Herron <herron.philip@googlemail.com>2021-02-13 09:54:47 +0000
commitfac8276f737351afbde34a85f2b6c224b400313b (patch)
tree8fba0fff8373f98b4da3a684c5ea335a913bdab5 /gcc
parentebb5de23436436d4206766552e76cd4b802e0c74 (diff)
downloadgcc-fac8276f737351afbde34a85f2b6c224b400313b.zip
gcc-fac8276f737351afbde34a85f2b6c224b400313b.tar.gz
gcc-fac8276f737351afbde34a85f2b6c224b400313b.tar.bz2
Fix parsing of Char literals
Diffstat (limited to 'gcc')
-rw-r--r--gcc/rust/parse/rust-parse-impl.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/gcc/rust/parse/rust-parse-impl.h b/gcc/rust/parse/rust-parse-impl.h
index bd41ce3..cb65ed2 100644
--- a/gcc/rust/parse/rust-parse-impl.h
+++ b/gcc/rust/parse/rust-parse-impl.h
@@ -12192,6 +12192,10 @@ Parser<ManagedTokenSource>::null_denotation (
return std::unique_ptr<AST::LiteralExpr> (
new AST::LiteralExpr (tok->get_str (), AST::Literal::STRING,
tok->get_type_hint (), {}, tok->get_locus ()));
+ case CHAR_LITERAL:
+ return std::unique_ptr<AST::LiteralExpr> (
+ new AST::LiteralExpr (tok->get_str (), AST::Literal::CHAR,
+ tok->get_type_hint (), {}, tok->get_locus ()));
case TRUE_LITERAL:
return std::unique_ptr<AST::LiteralExpr> (
new AST::LiteralExpr ("true", AST::Literal::BOOL, tok->get_type_hint (),