JuliaEditorSupport / atom-language-julia

A Julia language support package for the Atom editor
Other
52 stars 39 forks source link

Weird case of function tokenization when end of line comment includes parentheses #240

Closed CameronBieganek closed 3 years ago

CameronBieganek commented 3 years ago
using StaticArrays

struct Point{Dim,T}
  coords::SVector{Dim,T}
end

Point((1,2)) # figures out that (Dim, T) = (2, Int)
Point((1,2)) # figures out that (Dim, T)

image

pfitzseb commented 3 years ago

The = is the issue here, not the closing parenthesis (because we think it's a short form function definition in that case...).