Skip to content

Commit

Permalink
Fixes semantic analysis end offset (#126)
Browse files Browse the repository at this point in the history
  • Loading branch information
ncordon authored Oct 24, 2023
1 parent a932bbd commit 2fd5fb0
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ function findEndPosition(
};
} else {
return {
offset: token.start + 1,
offset: token.stop + 1,
relative: Position.create(
token.line - 1,
token.column + token.text.length,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ describe('Semantic validation spec', () => {
message:
'Query cannot conclude with CALL (must be a RETURN clause, an update clause, a unit subquery call, or a procedure call with no YIELD)',
offsets: {
end: 50,
end: 53,
start: 0,
},
range: {
Expand Down Expand Up @@ -125,7 +125,7 @@ describe('Semantic validation spec', () => {
{
message: 'CALL { ... } IN TRANSACTIONS in a UNION is not supported',
offsets: {
end: 126,
end: 131,
start: 0,
},
range: {
Expand All @@ -143,7 +143,7 @@ describe('Semantic validation spec', () => {
{
message: 'CALL { ... } IN TRANSACTIONS in a UNION is not supported',
offsets: {
end: 126,
end: 131,
start: 73,
},
range: {
Expand Down Expand Up @@ -463,7 +463,7 @@ describe('Semantic validation spec', () => {
message:
'The variable `aNum` is shadowing a variable with the same name from the outer scope and needs to be renamed',
offsets: {
end: 67,
end: 70,
start: 66,
},
range: {
Expand Down Expand Up @@ -562,7 +562,7 @@ describe('Semantic validation spec', () => {
message:
'Match modes such as `DIFFERENT RELATIONSHIPS` are not supported yet.',
offsets: {
end: 17,
end: 28,
start: 6,
},
range: {
Expand Down Expand Up @@ -590,7 +590,7 @@ describe('Semantic validation spec', () => {
{
message: 'Path selectors such as `ANY 2 PATHS` are not supported yet',
offsets: {
end: 26,
end: 30,
start: 19,
},
range: {
Expand Down

0 comments on commit 2fd5fb0

Please sign in to comment.