-
Notifications
You must be signed in to change notification settings - Fork 3
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
TypeError: Expected string
for scope
, got undefined
#5
Comments
Will look into this, thanks for the report. |
Looks like its an issue with parsing CSON grammar. If i convert your example to JSON then it works fine https://www.convertsimple.com/convert-cson-to-json/. Will see how I can fix this, but that is a workaround in the meantime. |
It doesn't seem to exclusively be a CSON problem. It occurs with YAML too, like this one. EDIT: I also tried converting the YAML to JSON and I still get the error. |
Looking into it, the error seems to be here: Line 36 in 1a0a549
When there is an unexpected scopeName property the code doesn't work.
For instance your latest example file: scope: source.forth It says |
Try it now, hopefully fixed. |
Hmm that's interesting. Welp, will have to do fix attempt two. |
Ah - this is a bug in the CSON parser, fabiospampinato/cson2json#1. Seems like it can't handle mixed indents: repository:
escaped_characters:
patterns: true
scope: "source.factor"
scopeName: "source.factor" Will have to switch CSON parser. |
The previous fix resolves this problem, but the original issue is with the CSON. |
This error keeps happening with most (though not all) of the grammars I'm testing. This includes grammars that don't even have a scope property, like this one.
I'm not sure why this happens, any ideas?
The text was updated successfully, but these errors were encountered: