please sit on this for a while.
once they've been discussed and are in the language spec,
then it will be time to update the other things.
right now complex is still an experiment in 6g.
(it's one that is likely to succeed, but let's
let it run its course.) updating the vim syntax
now just means having to update it again later
if other predeclared identifiers are added.
russ
Aah, okay. That's fine. I thought the matter had been settled.
On Thu, Feb 25, 2010 at 10:12 AM, Russ Cox <rsc@golang.org> wrote:
> please sit on this for a while.
> once they've been discussed and are in the language spec,
> then it will be time to update the other things.
> right now complex is still an experiment in 6g.
> (it's one that is likely to succeed, but let's
> let it run its course.) updating the vim syntax
> now just means having to update it again later
> if other predeclared identifiers are added.
>
> russ
>
Close. 0x123i is not an imaginary literal.
Imaginary literals are any float followed by i
or decimal string followed by i.
So if these are the floats:
syn match goFloat "\<\d\+\.\d*\([Ee][-+]\d\+\)\?\>"
syn match goFloat "\<\.\d\+\([Ee][-+]\d\+\)\?\>"
syn match goFloat "\<\d\+[Ee][-+]\d\+\>"
then these would be the imaginaries:
syn match goFloat "\<\d\+\.\d*\([Ee][-+]\d\+\)\?i\>"
syn match goFloat "\<\.\d\+\([Ee][-+]\d\+\)\?i\>"
syn match goFloat "\<\d\+[Ee][-+]\d\+i\>"
syn match goFloat "\<\d\+i\>"
Russ
On Tue, Mar 16, 2010 at 2:26 PM, Russ Cox <rsc@golang.org> wrote:
> Close. 0x123i is not an imaginary literal.
> Imaginary literals are any float followed by i
> or decimal string followed by i.
Done. I've ditched the hexadecimal and octal imaginary literals.
Dave.
Looks fine. I don't know what "hi def link" means but
imaginary seems closer to Float than to Number (== Integer?).
Do you want to change it to Float? Your call.
Russ
On Tue, Mar 16, 2010 at 2:33 PM, Russ Cox <rsc@golang.org> wrote:
> Looks fine. I don't know what "hi def link" means but
> imaginary seems closer to Float than to Number (== Integer?).
>
> Do you want to change it to Float? Your call.
Roughly, hi def link will link a definition (e.g. goFloat) to a syntax
highlighting class (e.g. Float). It's up to a colorscheme to define
what that actually translates to. I haven't come across a colorscheme
that distinguishes Float and Number, so I'm fine leaving it as-is.
Dave.
Issue 224042: code review 224042: Add complex/complex64/complex128 to Vim syntax file.
(Closed)
Created 15 years ago by dsymonds
Modified 14 years, 11 months ago
Reviewers:
Base URL:
Comments: 0