-
Notifications
You must be signed in to change notification settings - Fork 28
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
scala parsing bug? #58
Comments
Another broken example is this one: I think both of those boil down to a too simplistic grammar that allows arbitrary nesting of any code elements. |
The first example shows the bundle doesn't understand nested comments. /* this is a comment
/* this is a nested comment */
this is part of the outer comment, and should be colored as such */ The second example shows that the bundle doesn't understand back-ticked identifiers. val `string/*` = Foo("""
I'm pleased to see that the tm grammar does understand that the /*
above is part of the identifier declaration. Pretty much anything can
go in there. Spaces, escaped characters, until the closing backtick.
It also understands that /* within strings don't really start comments.
""")
val length = `string/*`.explain("""
It doesn't understand this time that /* is part of the referenced identifier,
which means that the closing backtick, the method call, and this string
are all colored incorrectly as comments.
""") I had planned to link to the language spec around back-ticked identifiers, but it turns out that the spec is messed up 😞. I filed an issue about the spec here. Let me know if there's anything else I can do to help. |
The first issue seems to have been patched in textmate@40f14ec. I'll create a new issue for the second one. |
Hi,
Github uses this tmbundle for rendering scala code - I noticed that there seems to be an issue with highlighting:
e.g. https://github.com/twitter/util/blob/master/util-core/src/main/scala/com/twitter/util/Future.scala
OsX 10.10, Chrome version 38.0.2125.122 - 10.10
The text was updated successfully, but these errors were encountered: