crystal-lang-tools/vscode-crystal-lang

Wrong syntax highlighting when symbol name is equal to a keyword

MatheusRich opened this issue · 3 comments

image

Code:

KEYWORDS = {
  and:    :AND,
  else:   :ELSE,
  false:  :FALSE,
  fn:     :FN,
  if:     :IF,
  let:    :LET,
  nil:    :NIL,
  or:     :OR,
  print:  :PRINT,
  puts:   :PUTS,
  return: :RETURN,
  true:   :TRUE,
  while:  :WHILE,
}

def something(**args)
  puts args
end

something(if: 1, else: 2, nil: 3, other: 4)

not sure if this is related as well

Screenshot_20210102_122828

carbon(1)

carbon

This is some syntax highlighting coming from carbon.sh.
Can you confirm @MatheusRich @grantspeelman that is the desired behaviour?

I'm studying the grammar it uses for Crystal.
The format is completely different.

If someone can help on this would be great!

That looks Good to me 👍🏽