diff --git a/source.c b/source.c index 8dd4343..f3946e7 100644 --- a/source.c +++ b/source.c @@ -1 +1,2 @@ -*a=2; \ No newline at end of file +*a=2; +int c = a+2; \ No newline at end of file diff --git a/src/main.rs b/src/main.rs index a59c7d6..d6f4ae0 100644 --- a/src/main.rs +++ b/src/main.rs @@ -748,7 +748,7 @@ impl Lexer { self.tokens.push(Token::Operators(Operator::Add)); self.tokens_location.push(TokenLocation { row: self.row, - col: self.col, + col: self.col-1, }); self.state = State::Start; return ptr_index; @@ -812,7 +812,7 @@ impl Lexer { self.tokens.push(Token::Operators(Operator::Subtract)); self.tokens_location.push(TokenLocation { row: self.row, - col: self.col, + col: self.col-1, }); self.state = State::Start; return ptr_index;