Nodeclipse / coffeescript-eclipse

CoffeeScript plugin for Eclipse using XText (moved to Nodeclipse; looking for new owner)
http://www.nodeclipse.org/coffeescript/
20 stars 9 forks source link

x={'foo':7} is parsed incorrectly #10

Open scharf opened 11 years ago

scharf commented 11 years ago

Something is wrong with the {' if I add a space between the { and the ' everything is ok.

The problem is that I have some existing code that I cannot chage...

paulvi commented 11 years ago

@scharf Michael, I assume you actually can do this issue.

scharf commented 11 years ago

well -- it is kind of solved by my solution to the string quoting problems: at least the parser does not get confused, though the string is not seen as string by the highlighter. In fact the first character after a { is swallowed. If you put a number the the first digit is swallowed, if you put true it is not highlighted...

Something in the grammar/lexer is that swollows the first character after a '{'.

My guess is that it is the INDENT '{*' token in some way -- but I have not looked how the parser/lexer have been extended to deal with the indentation....

paulvi commented 11 years ago

Could this xml file defining Coffee language help to all syntax issues?

I think if we take language definition from other tools, we can save time on the very basic. If we could read such files, we insure some future version updates.

Info about .tmLanguage file name extension :
File Type: TextMate Language Grammar File
12 Language Grammars, one more link