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

fix the custom lexer to be able to handle the whitespace at the end of the file #21

Open paulvi opened 10 years ago

paulvi commented 10 years ago

extract as separate issue from #19 link to file https://github.com/Nodeclipse/coffeescript-eclipse/blob/master/csep/src/com/aptana/editor/coffee/parsing/lexer/CoffeeScanner.java

@cdietrich said:

as said before. we need someone that can fix the custom lexer to be able to handle the whitespace at the end of the file. for the rest a regeneration should work.

paulvi commented 10 years ago

Note: I wonder if there should be replaceAll ...

https://github.com/Nodeclipse/coffeescript-eclipse/blob/master/csep/src/com/aptana/editor/coffee/parsing/lexer/CoffeeScanner.java#L362

cdietrich commented 10 years ago

In general the whitespace handling has to be fixed. the positions in the real file and in the lexer have to match.

cdietrich commented 10 years ago

you can have a look at my fork to see what i have done so far. i cannot verify if my work did any damage to the correctness of the parser nor that it solves the problem in all cases.

https://github.com/cdietrich/coffeescript-eclipse/blob/master/csep/src/com/aptana/editor/coffee/parsing/lexer/CoffeeScanner.java