Skip to content

Commit

Permalink
parser: port upstream changes
Browse files Browse the repository at this point in the history
  • Loading branch information
llogick committed Feb 21, 2024
1 parent 42fb30b commit f06b587
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/stage2/Parse.zig
Original file line number Diff line number Diff line change
Expand Up @@ -3554,7 +3554,7 @@ fn parsePtrModifiers(p: *Parse) !PtrModifiers {
var saw_const = false;
var saw_volatile = false;
var saw_allowzero = false;
var saw_addrspace = false;

while (true) {
switch (p.token_tags[p.tok_i]) {
.keyword_align => {
Expand Down Expand Up @@ -3595,7 +3595,7 @@ fn parsePtrModifiers(p: *Parse) !PtrModifiers {
saw_allowzero = true;
},
.keyword_addrspace => {
if (saw_addrspace) {
if (result.addrspace_node != 0) {
try p.warn(.extra_addrspace_qualifier);
}
result.addrspace_node = try p.parseAddrSpace();
Expand Down
2 changes: 1 addition & 1 deletion src/stage2/render.zig
Original file line number Diff line number Diff line change
Expand Up @@ -3252,7 +3252,7 @@ fn AutoIndentingStream(comptime UnderlyingWriter: type) type {
/// Turns all one-shot indents into regular indents
/// Returns number of indents that must now be manually popped
pub fn lockOneShotIndent(self: *Self) usize {
var locked_count = self.indent_one_shot_count;
const locked_count = self.indent_one_shot_count;
self.indent_one_shot_count = 0;
return locked_count;
}
Expand Down

0 comments on commit f06b587

Please sign in to comment.