Share via


CharClass Enumeration

Specifies the class or kind of the current character in the Babel Package language service.

enum CharClass 
{ 
   CharDefault = 0,
   CharText = CharDefault,
   CharKeyword,
   CharIdentifier,
   CharString,
   CharLiteral,
   CharOperator,
   CharDelimiter,
   CharEmbedded,
   CharWhiteSpace,
   CharLineComment,
   CharComment,
   CharDefaultLast = CharComment
};

Elements

  • CharDefault
    Default character type, representing plain text.

  • CharText
    Alternative for CharDefault.

  • CharKeyword
    Represents a reserved keyword (for example, in C++: for, if, or while).

  • CharIdentifier
    Represents a user-defined name for a method, variable, class, or namespace.

  • CharString
    Represents a double-quoted string.

  • CharLiteral
    Represents a literal value, typically a number or a single-quoted string.

  • CharOperator
    Represents an operator; for example, + (plus operator), - (minus operator), = (assignment operator), or << (insertion operator).

  • CharDelimiter
    Represents a delimiter, a separator of some form. For example, the semicolon at the end of a C++ statement.

  • CharEmbedded
    Represents an embedded token that is to be treated like a comment but may have different properties (such as a property embedded in the source).

  • CharWhiteSpace
    Represents a sequence of white space, typically space, tab, and/or newlines.

  • CharLineComment
    Represents a line comment, a comment that starts at some point and stops at the end of the line.

  • CharComment
    Represents a block comment, a comment that starts at some point and ends at some other point.

  • CharDefaultLast
    Use CharDefaultLast + 1 to add additional token types.

Remarks

The CharClass value is used to determine the word extent and search ranges. The color class (see ColorClass Enumeration) normally coincides with the CharClass values, but is not required to. The primary difference is that the CharClass value is fixed and color classes can be customized, which allows the Babel package to use the CharClass information to implement correct navigation and search functionality.

These values are specified for each character on a line in the IColorSink::Colorize Method.

Requirements

Header: bableservice.idl

See Also

Reference

IColorSink::Colorize Method

Other Resources

Babel Enumerations