Comments (12)
Sorry, I just noticed that in this case a semicolon after print will make the error disappear. But the script works fine with or without semicolon
from awk-language-server.
I can not replicate this with version 0.6.2. What version do you have?
from awk-language-server.
Same version. Trying to construct another test case which shows it more conclusively
from awk-language-server.
This here is from one of the scripts. It shows the same error, but at [7,6]
BEGINFILE {
if( FILENAME ~ /\.csv$/ )
{
FS = ";";
nCSV++;
}
else
{
FS = " ";
}
}
from awk-language-server.
The second example also looks fine on my side.
I assume that you're on linux. Could you exec the following 3 commands and paste their output here?
code --list-extensions --show-versions
~/.vscode/extensions/beaglefoot.awk-ide-vscode-?.?.?/node_modules/awk-language-server/out/cli.js --version
md5sum ~/.vscode/extensions/beaglefoot.awk-ide-vscode-?.?.?/node_modules/awk-language-server/tree-sitter-awk.wasm
from awk-language-server.
Sorry, was in a meeting. Unfortunately I have to work on a windows machine for this. It seems that code on windows doesn't have the same cli. I tried to get the inormation in other ways.
VS-Code Version:
Version: 1.63.2 (user setup)
Commit: 899d46d82c4c95423fb7e10e68eba52050e30ba3
Date: 2021-12-15T09:40:02.816Z (2 wks ago)
Electron: 13.5.2
Chromium: 91.0.4472.164
Node.js: 14.16.0
V8: 9.1.269.39-electron.0
OS: Windows_NT x64 10.0.19043
I found your addin under <USER>\.vscode. I copied that from the manifest:
<Identity Language="en-US" Id="awk-ide-vscode" Version="0.6.2" Publisher="beaglefoot" />
I created the md5sum with Total Commander.
bc892463771af140d3e197bf99ac821d *tree-sitter-awk.wasm
I looked into package.json and it shows me 0.6.2 .
Still missing is the list of extensions and their versions. Searching for a way. But maybe it's just the OS which makes the difference here
from awk-language-server.
Found it finally. I had to use the code.cmd instead of the code.exe. Using said code.cmd it gave me the extensions
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
I will check this on a windows notebook with the same versions, but probably different vscode-addins
from awk-language-server.
Your versions and md5 sum are ok.
I checked examples above on box with windows both with mine and yours set of extensions and all is fine. Still cannot reproduce.
At this point I suspect that there might be several versions of vscode on your system. What if you run vscode from command line with just code.cmd
you used earlier? Does the problem persists this way?
from awk-language-server.
Ok, I finally reproduced that and the reason is that on windows lines end with CRLF by default.
Here's quick fix:
- Press Shift+Ctrl+P
- Enter 'Change End of Line Sequence'
- Select 'LF'
from awk-language-server.
I tried on my development notebook now. Different setup, same Windows version (21H1), same VS-Code version.
The effect is the same. I tried starting VS-Code via the code.cmd with no recognisable difference.
Another strange effect: If I change the position of the opening brace to be on the same line after "else", the warning is gone. But the colourization hints to the parser not recognising "else" as a syntax element.
BEGIN {
nCSV = 0;
}
BEGINFILE {
if( FILENAME ~ /\.csv$/ )
{
FS = ";";
nCSV++;
}
else {
FS = " ";
}
}
from awk-language-server.
Okay, that was a good catch. I'm used to similar problems since I often have to develop on QNX (RT-Unix) or Linux-systems. But I didn't think of it here.
Thank you very much
from awk-language-server.
That makes two of us 😄
Thanks for reporting.
from awk-language-server.
Related Issues (20)
- Symbols are not updated on file renames, deletions and creation HOT 2
- Indexing fails if workspace contains directory with no access to
- Add --noIndex option for CLI mode
- Add support for AWKPATH env variable
- Add namespaces support
- npm install fails HOT 2
- Language server won't start due to invalid url HOT 2
- Formatter cannot be initialized from a directory with space character HOT 1
- Incorrect code highlight with cursor on comment
- Incompatibility with node v19.0.0 HOT 1
- Install > missing chmod +x HOT 4
- Multidimensional array index is not recognized HOT 1
- Where snippets are defined?
- snip not work HOT 4
- Enhance automatically generated snippets HOT 5
- RangeError: Maximum call stack size exceeded HOT 1
- Error when running "npm update -g" HOT 4
- using [[:space:]] cause the IDE to point out a syntax error HOT 2
- Add installation for helix HOT 1
- Maximum call stack size exceeded HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from awk-language-server.