aboutsummaryrefslogtreecommitdiff
path: root/gcc/rust/hir
diff options
context:
space:
mode:
authoransh <anshmalik2002@gmail.com>2024-06-24 04:01:53 -0700
committerCohenArthur <arthur.cohen@embecosm.com>2024-06-27 11:25:11 +0000
commit9e5a4b410d026ac4a7d527edc4b6848524d281a3 (patch)
tree88ceb168cca42f16fb8fc8300589221497437a41 /gcc/rust/hir
parent40d52922469989d16626fd29d1943596af919d92 (diff)
downloadgcc-9e5a4b410d026ac4a7d527edc4b6848524d281a3.zip
gcc-9e5a4b410d026ac4a7d527edc4b6848524d281a3.tar.gz
gcc-9e5a4b410d026ac4a7d527edc4b6848524d281a3.tar.bz2
Add RAW_STRING_LITERAL
gcc/rust/ChangeLog: * ast/rust-ast-collector.cc (TokenCollector::visit): Handle case for RAW_STRING_LITERAL. * ast/rust-ast.cc (AttributeParser::parse_meta_item_inner): Likewise. (AttributeParser::parse_literal): Likewise. * ast/rust-ast.h: Likewise. * hir/rust-ast-lower-base.cc (ASTLoweringBase::lower_literal): Likewise. * lex/rust-lex.cc (Lexer::parse_raw_string): Likewise. * lex/rust-token.cc (Token::as_string): Likewise. * lex/rust-token.h (enum PrimitiveCoreType): Likewise. * parse/rust-parse-impl.h (Parser::parse_attr_input): Likewise. (Parser::parse_literal_expr): Likewise. (Parser::parse_pattern_no_alt): Likewise. Signed-off-by: ansh <anshmalik2002@gmail.com>
Diffstat (limited to 'gcc/rust/hir')
-rw-r--r--gcc/rust/hir/rust-ast-lower-base.cc3
1 files changed, 3 insertions, 0 deletions
diff --git a/gcc/rust/hir/rust-ast-lower-base.cc b/gcc/rust/hir/rust-ast-lower-base.cc
index 5113880..207ea6b 100644
--- a/gcc/rust/hir/rust-ast-lower-base.cc
+++ b/gcc/rust/hir/rust-ast-lower-base.cc
@@ -928,6 +928,9 @@ ASTLoweringBase::lower_literal (const AST::Literal &literal)
case AST::Literal::LitType::BYTE_STRING:
type = HIR::Literal::LitType::BYTE_STRING;
break;
+ case AST::Literal::LitType::RAW_STRING: // TODO: Lower raw string literals.
+ rust_unreachable ();
+ break;
case AST::Literal::LitType::INT:
type = HIR::Literal::LitType::INT;
break;