jpellerin / emacs-crystal-mode

A minimal crystal mode for emacs, based on ruby-mode (of course)
GNU General Public License v3.0
23 stars 13 forks source link

Highlight type restrictions #1

Open jpellerin opened 9 years ago

rocky commented 8 years ago

Is this still an issue? When I look at the first example in http://crystal-lang.org/docs/syntax_and_semantics/type_restrictions.html

def add(x : Number, y : Number)
  x + y
end

Number is in a different font.

jpellerin commented 8 years ago

It sort of works by accident, because of the capitalization I think. There's no special support for giving the restriction in a different face. Or at least I don't remember adding any! But if it is working well enough as-is then I'm ok with closing this issue.

elthariel commented 8 years ago

Nah, I had a small look and as far as i understand elisp, there's no support for it in the parsers. That's also a problem when you do

alias NewType = Int8*
class Test
  def test
  end
end