We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
override_ty
1 parent 6ec0996 commit fea757eCopy full SHA for fea757e
3 files changed
c2rust-transpile/src/c_ast/mod.rs
@@ -1383,6 +1383,18 @@ impl TypedAstContext {
1383
_ => false,
1384
}
1385
1386
+
1387
+ /// Same as the `Index` trait, but doesn't bypass `Paren`.
1388
+ pub fn index_expr_raw(&self, index: CExprId) -> &CExpr {
1389
+ static BADEXPR: CExpr = Located {
1390
+ loc: None,
1391
+ kind: CExprKind::BadExpr,
1392
+ };
1393
+ match self.c_exprs.get(&index) {
1394
+ None => &BADEXPR,
1395
+ Some(e) => e,
1396
+ }
1397
1398
1399
1400
impl CommentContext {
0 commit comments