Skip to content

[EXTENSIONS] Tokens list

MotionCode Dev edited this page Jun 7, 2026 · 1 revision

Syntax Highlighting Tokens

The following tokens are recommended for syntax highlighting rules. They are compatible with most Ace themes and follow common TextMate conventions.

General

text

Default text. Used when no specific token applies.


Keywords

keyword

Language keywords.

Examples:

  • if
  • else
  • return
  • while

keyword.control

Control flow keywords.

Examples:

  • if
  • switch
  • for
  • break

keyword.operator

Operators.

Examples:

  • +
  • -
  • &&
  • ||
  • =

keyword.other

Other language-specific keywords.


Storage

storage

Storage-related declarations.

storage.type

Type declarations.

Examples:

  • class
  • interface
  • struct
  • enum

storage.modifier

Modifiers.

Examples:

  • public
  • private
  • static
  • readonly

Constants

constant

Generic constant value.

constant.numeric

Numbers.

Examples:

  • 123
  • 3.14
  • 0xFF

constant.language

Language-defined constants.

Examples:

  • true
  • false
  • null
  • undefined

constant.character

Character literals.

Examples:

  • 'a'
  • '\n'

constant.character.escape

Escape sequences.

Examples:

  • \n
  • \t
  • \\

constant.other

Other constant values.


Strings

string

String literals.

Examples:

  • "hello"
  • 'world'

string.quoted

Quoted strings.

string.regexp

Regular expressions.

Examples:

  • /\w+/
  • /[0-9]+/g

string.interpolated

Interpolated string segments.

Examples:

  • ${name}
  • {value}

Comments

comment

Generic comment.

comment.line

Single-line comment.

Examples:

// comment

Clone this wiki locally