Skip to content
This repository was archived by the owner on Dec 15, 2022. It is now read-only.
This repository was archived by the owner on Dec 15, 2022. It is now read-only.

Type names of form "sometype_t" lose syntax highlighting with capitalization. #45

Closed

Description

@stuthedew

So maybe this is just a convention that I am not familiar with, but I've noticed something weird (at least to me) about Atom's C syntax highlighting.
Specifically, type names ending with "_t" are only highlighted if all letters are lowercase. For example:

lettercase_t foo1; // "lettercase_t" is highlighted by Atom.

letterCase_t foo2; // "letterCase_t" is not highlighted by Atom.

I've just noticed that it does the same thing here after posting the above example. Is this a bug or just expected behavior?

Thanks!

Activity

  1. changed the title [-]Types of form "sometype_t" lose syntax highlighting with capitalization.[/-] [+]Type names of form "sometype_t" lose syntax highlighting with capitalization.[/+] on Nov 26, 2014
  2. lee-dohm commented on Nov 27, 2014

    @lee-dohm
    Contributor

    Looks like a bug to me. The C spec allows upper and lowercase letters for identifiers, even of types. Though POSIX reserves the _t suffix for system implementation and the common _t types are all lower-case.

  3. vdcow commented on Aug 9, 2015

    @vdcow

    There are several related problems.

    1. Variable that ends with _t is highlighted as type e.g.
    int var_t;
    1. Non standard types that are not ended with _t are not highlighted at all e.g.
    MYTYPE *fh;
  4. added a commit that references this issue on Oct 6, 2015
    3808b4b
  5. ear commented on Jan 14, 2016

    @ear

    I hope this is right but let me ask: should this have prevented the error in highlighting in these cases I have today? Here are some screenshots:

    screen shot 2016-01-14 at 21 35 04
    screen shot 2016-01-14 at 21 35 26

    I.e. size_t and <cstdint>/ <stdint.h> types like uint64_t.

    I guess it bears mentioning I am in a .cpp file. Atom is just using this language-c package, no other relevant ones.

  6. winstliu commented on Jan 14, 2016

    @winstliu
    Contributor

    @ear Your syntax theme might not support C that well. Can you please click right before size_t and execute the Editor: Log Cursor Scope command? Thanks!

  7. ear commented on Jan 14, 2016

    @ear

    Sure thing! Here it is:

    Scopes at Cursor
    
    source.cpp
    support.type.sys-types.c
    

    I am using UI Theme Nucleus Dark and Syntax Theme Atom Gooey

  8. winstliu commented on Jan 14, 2016

    @winstliu
    Contributor

    Ok, that means that language-c is picking them up correctly. You might want to file an issue with Atom Gooey asking them to highlight support.type.sys-types.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions