feature. See also
. The project being documented here (as the example) is the Zig library itself.
MacroTranslator.parseCPostfixExpr
fn parseCPostfixExpr(mt: *MacroTranslator, scope: *Scope, type_name: ?ZigNode) ParseError!ZigNode
File
Code
fn parseCPostfixExpr(mt: *MacroTranslator, scope: *Scope, type_name: ?ZigNode) ParseError!ZigNode {
var node = try mt.parseCPostfixExprInner(scope, type_name);
// This should do approximately the same by concatting any strings and identifiers
// after a primary or postfix expression.
while (true) {
switch (mt.peek()) {
.string_literal,
.string_literal_utf_16,
.string_literal_utf_8,
.string_literal_utf_32,
.string_literal_wide,
.macro_param,
.macro_param_no_expand,
=> {},
.identifier, .extended_identifier => {
if (mt.t.global_scope.blank_macros.contains(mt.tokSlice())) {
mt.i += 1;
continue;
}
},
else => break,
}
const rhs = try mt.parseCPostfixExprInner(scope, type_name);
node = try ZigTag.array_cat.create(mt.t.arena, .{ .lhs = node, .rhs = rhs });
}
return node;
}