Comments (10)
Okay, it seems to be loading my parser - but not using my format for some reason?
registerFileType((fileExt, filePath, fileData) => {
if (['lib', 'g.lib'].includes(fileExt)) {
return true;
}
return false;
});
registerParser(() => {
read(1);
addRow('Type', getHexOxValue(), 'Record Type');
read(2);
const recordLength = getNumberValue();
addRow('Length', recordLength, 'The full length of the record');
read(recordLength);
addRow('Data', getStringValue(), 'Data');
});
from binary-file-viewer.
Trying to create a parser for this:
http://www.azillionmonkeys.com/qed/Omfg.pdf
from binary-file-viewer.
In the problems area you should find the hint:
Actually you used a 'O' instead of a '0' (zero) inside getHex0xValue.
If you change it and save, you should see your parsed file:
from binary-file-viewer.
Two things:
- How did you get highlighting?
- All methods were through auto-completion/intellisense - so how that typo got in, I wouldn't know - or it's the one I copied from the "Getting Started" example of the WAV file
from binary-file-viewer.
-
Which highlighting? the red squiggles?
They come from the binary file viewer extension. Any errors are also written to the PROBLEMS pane.
Is it not working for you?
You need to save the js file before it is analyzed. -
For me it displays the correct suggestion:
You can see the text 'Binary File Viewer' to the right of the suggestions which shows the origin.
The others are probably from intellisense
Maybe you chose the wrong auto-completion.
from binary-file-viewer.
- Is not working for me - do I need to select a specific format? Or do I need to edit the parser file from a window where the extension itself is also being used? Auto completion works though
- It does for me too - but it doesn't show the errors
I also found the source for my error, see:
binary-file-viewer/assets/local/help/help.md
Line 100 in 204b981
from binary-file-viewer.
-
Yes, while developing a parser file you need to have the parser file and the parsed file in the same vscode window.
The cause of this is explained a little bit here: filewatcher -
Thanks for the hint. I will correct that.
from binary-file-viewer.
- Thanks, good to know
- You're welcome!
Another question - as you can see in http://www.azillionmonkeys.com/qed/Omfg.pdf the binary file contains multiple records - I was under the impression I could show each record as a separate line through the parser - but it only works with rows - not columns - is this possible at all?
from binary-file-viewer.
" I was under the impression I could show each record as a separate line through the parser - but it only works with rows - not columns "
Could you elaborate a bit. I don't understand the problem.
from binary-file-viewer.
No elaboration needed - I was mistaken how Binary files work 🤣
from binary-file-viewer.
Related Issues (20)
- Feature Request: support ${workspaceFolder} ? HOT 12
- Feature Request: View in Hex Editor HOT 1
- read() with negative offset did not move the pointer backwards HOT 5
- [Question] Where are the standard library objects such as Array or Object? HOT 9
- Getting the file size HOT 8
- Viewing of Packed Files HOT 1
- Zoom in charts not working.
- Open different file in parser to fetch additional information HOT 1
- Options for basic user interaction HOT 4
- Signed / Unsigned number HOT 9
- Hardcoded inline width in canvas element HOT 4
- 32 bit flag field HOT 9
- different colors? HOT 3
- Navigation seems not work? HOT 2
- Question: Changing values HOT 1
- Reading data from any file position HOT 10
- How to read float value? HOT 5
- Can't use a variable with the read() function HOT 8
- Updating the view HOT 1
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 binary-file-viewer.