Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes semantic errors positions in codemirror #126

Merged
merged 1 commit into from
Oct 24, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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