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

Line breaks in string literal #6

Closed
martin-honnen opened this issue Dec 19, 2021 · 2 comments
Closed

Line breaks in string literal #6

martin-honnen opened this issue Dec 19, 2021 · 2 comments
Labels
bug Something isn't working upstream

Comments

@martin-honnen
Copy link

While playing with the XPath notebook I found that a sample like

let $xml1 := parse-xml('<root>
  <item>a</item>
  <item>b</item>
</root>')
return $xml1/root/item

runs fine but syntax errors are displayed for the second, third line and fourth line: "unexpected token".
That raises the question whether line breaks in XPath string literals are allowed, I think they are allowed.

@pgfearo
Copy link
Member

pgfearo commented Dec 19, 2021 via email

@pgfearo
Copy link
Member

pgfearo commented Dec 20, 2021

The root cause of this is that there is code that doesn't handle multi-line string tokens that must be split so there is just one token per line. The affected code is actually in the lexer and diagnostics features in our XSLT/XPath extension that the XPath Notebook extension uses.

Please track progress on this at: vscode-xslt-tokenizer #92

@pgfearo pgfearo closed this as completed Dec 20, 2021
@pgfearo pgfearo added bug Something isn't working upstream labels Dec 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working upstream
Projects
None yet
Development

No branches or pull requests

2 participants