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

Error returned during editing #31

Closed
Brad-O opened this issue Oct 3, 2018 · 3 comments
Closed

Error returned during editing #31

Brad-O opened this issue Oct 3, 2018 · 3 comments
Assignees
Labels
bug Something isn't working

Comments

@Brad-O
Copy link
Collaborator

Brad-O commented Oct 3, 2018

Subject of the issue

Error returned during normal editing

Your environment

  • shebang: --#!2450
  • TSPLang version: 0.4.0
  • VSCode version info:
    Version: 1.27.2 (user setup)
    Commit: f46c4c469d6e6d8c46f268d1553c5dc4b475840f
    Date: 2018-09-12T16:17:45.060Z
    Electron: 2.0.7
    Chrome: 61.0.3163.100
    Node.js: 8.9.3
    V8: 6.1.534.41
    Architecture: x64

Steps to reproduce

Block of TSP when error was generated:
function update()
dmm.measure.read(defbuffer1)
local percentChange = {}
for i = 0, (dmm.measure.count - 1) do
percentChange[i
end
end

Expected behaviour

No error

Actual behaviour

Error returned in TSP Command Autocomplete Output:
[Error - 10:33:57 AM] Request textDocument/completion failed.
Message: Request textDocument/completion failed with message: Invalid regular expression: /percentChange[i/: Unterminated character class
Code: -32603

@ethall ethall added the bug Something isn't working label Oct 3, 2018
@ethall ethall self-assigned this Oct 3, 2018
@Brad-O
Copy link
Collaborator Author

Brad-O commented Oct 3, 2018

Another example:
By typing line:
buffer.write.reading(App_buffer, defbuffer1[e
(Attempting to type buffer.write.reading(App_buffer, defbuffer1[endindex])

Returns:
[Error - 11:06:44 AM] Request textDocument/completion failed.
Message: Request textDocument/completion failed with message: Invalid regular expression: /defbuffer1[e/: Unterminated character class
Code: -32603

@ethall
Copy link
Collaborator

ethall commented Oct 3, 2018

This is an error in line 50 of /server/src/completionProcessor.ts wherein I foolishly decided to use an un-escaped string variable as the text of a regular expression.

@ethall
Copy link
Collaborator

ethall commented Oct 3, 2018

Resolved in v0.4.2.

@ethall ethall closed this as completed Oct 3, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants