diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2021-10-04 08:58:18 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-10-04 08:58:18 +0000 |
commit | e0b9673a7ccad74706ed744bb882786b2fbaddf0 (patch) | |
tree | 1af416e04967de3572e2129c8db6cd2d0d181734 /gcc | |
parent | fdcad086e134b889ba542fadc1150bb2fcef8aea (diff) | |
parent | 31b999c5c783e4132d7c5027c1ead3a9aa8bf1dd (diff) | |
download | gcc-e0b9673a7ccad74706ed744bb882786b2fbaddf0.zip gcc-e0b9673a7ccad74706ed744bb882786b2fbaddf0.tar.gz gcc-e0b9673a7ccad74706ed744bb882786b2fbaddf0.tar.bz2 |
Merge #699
699: Remove raw string and raw byte string references from ast and hir r=philberty a=philberty
Raw strings and raw byte strings are simply different ways to
create string and byte string literals. Only the lexer cares
how those literals are constructed and which escapes are used
to construct them. The parser and hir simply see strings or
byte strings.
Co-authored-by: Mark Wielaard <mark@klomp.org>
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/rust/ast/rust-ast.h | 2 | ||||
-rw-r--r-- | gcc/rust/ast/rust-item.h | 2 | ||||
-rw-r--r-- | gcc/rust/hir/rust-ast-lower-expr.h | 6 | ||||
-rw-r--r-- | gcc/rust/hir/tree/rust-hir.h | 2 | ||||
-rw-r--r-- | gcc/rust/parse/rust-parse-impl.h | 3 |
5 files changed, 1 insertions, 14 deletions
diff --git a/gcc/rust/ast/rust-ast.h b/gcc/rust/ast/rust-ast.h index 96b8da4..b0738a2 100644 --- a/gcc/rust/ast/rust-ast.h +++ b/gcc/rust/ast/rust-ast.h @@ -259,10 +259,8 @@ public: { CHAR, STRING, - RAW_STRING, BYTE, BYTE_STRING, - RAW_BYTE_STRING, INT, FLOAT, BOOL diff --git a/gcc/rust/ast/rust-item.h b/gcc/rust/ast/rust-item.h index 7a34144..c7c8b8f 100644 --- a/gcc/rust/ast/rust-item.h +++ b/gcc/rust/ast/rust-item.h @@ -32,7 +32,7 @@ class MacroInvocationSemi; // TODO: inline? /*struct AbiName { std::string abi_name; - // Technically is meant to be STRING_LITERAL or RAW_STRING_LITERAL + // Technically is meant to be STRING_LITERAL public: // Returns whether abi name is empty, i.e. doesn't exist. diff --git a/gcc/rust/hir/rust-ast-lower-expr.h b/gcc/rust/hir/rust-ast-lower-expr.h index ff4c181..1d0b6cc 100644 --- a/gcc/rust/hir/rust-ast-lower-expr.h +++ b/gcc/rust/hir/rust-ast-lower-expr.h @@ -332,18 +332,12 @@ public: case AST::Literal::LitType::STRING: type = HIR::Literal::LitType::STRING; break; - case AST::Literal::LitType::RAW_STRING: - type = HIR::Literal::LitType::RAW_STRING; - break; case AST::Literal::LitType::BYTE: type = HIR::Literal::LitType::BYTE; break; case AST::Literal::LitType::BYTE_STRING: type = HIR::Literal::LitType::BYTE_STRING; break; - case AST::Literal::LitType::RAW_BYTE_STRING: - type = HIR::Literal::LitType::RAW_BYTE_STRING; - break; case AST::Literal::LitType::INT: type = HIR::Literal::LitType::INT; break; diff --git a/gcc/rust/hir/tree/rust-hir.h b/gcc/rust/hir/tree/rust-hir.h index 8ba6308..5a64662 100644 --- a/gcc/rust/hir/tree/rust-hir.h +++ b/gcc/rust/hir/tree/rust-hir.h @@ -45,10 +45,8 @@ public: { CHAR, STRING, - RAW_STRING, BYTE, BYTE_STRING, - RAW_BYTE_STRING, INT, FLOAT, BOOL diff --git a/gcc/rust/parse/rust-parse-impl.h b/gcc/rust/parse/rust-parse-impl.h index 8cce933..c2d3720 100644 --- a/gcc/rust/parse/rust-parse-impl.h +++ b/gcc/rust/parse/rust-parse-impl.h @@ -7556,8 +7556,6 @@ Parser<ManagedTokenSource>::parse_literal_expr (AST::AttrVec outer_attrs) literal_value = t->get_str (); lexer.skip_token (); break; - // case RAW_STRING_LITERAL: - // put here if lexer changes to have these case BYTE_CHAR_LITERAL: type = AST::Literal::BYTE; literal_value = t->get_str (); @@ -7568,7 +7566,6 @@ Parser<ManagedTokenSource>::parse_literal_expr (AST::AttrVec outer_attrs) literal_value = t->get_str (); lexer.skip_token (); break; - // case RAW_BYTE_STRING_LITERAL: case INT_LITERAL: type = AST::Literal::INT; literal_value = t->get_str (); |