From 49e834860faf8554375e90d6aaa37c9d1cf687d9 Mon Sep 17 00:00:00 2001 From: Sasha Koshka Date: Tue, 11 Oct 2022 13:35:11 -0400 Subject: [PATCH] Fixed dereference parsing --- parser/dereference.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/parser/dereference.go b/parser/dereference.go index 55d55e5..3d8d550 100644 --- a/parser/dereference.go +++ b/parser/dereference.go @@ -1,7 +1,6 @@ package parser import "git.tebibyte.media/arf/arf/lexer" -// import "git.tebibyte.media/arf/arf/infoerr" func (parser *ParsingOperation) parseDereference () ( dereference Dereference, @@ -18,13 +17,13 @@ func (parser *ParsingOperation) parseDereference () ( if err != nil { return } // if there is an offset, parse it - err = parser.expect(lexer.TokenKindUInt, lexer.TokenKindLBrace) + err = parser.expect(lexer.TokenKindUInt, lexer.TokenKindRBrace) if err != nil { return } if parser.token.Is(lexer.TokenKindUInt) { dereference.offset = parser.token.Value().(uint64) } - err = parser.nextToken(lexer.TokenKindLBrace) + err = parser.nextToken(lexer.TokenKindRBrace) if err != nil { return } err = parser.nextToken() if err != nil { return }