The language module

This module provides the Language class, which serves as the base class for all language definitions.

Additionally, there are some utility functions to manage and query built-in language definitions.

class Language[source]

Bases: object

A Language represents a set of Lexicons comprising a specific language.

A Language is never instantiated. The class itself serves as a namespace and can be inherited from.

classmethod comment_common()[source]

Provides subtle highlighting within comments.

The default implementation highlights words like TODO, XXX, TEMP, etc. using Comment.Alert, and highlights URLs and email addresses with the Comment.Url and Comment.Email action respectively. Most bundled languages use this method for their comment lexicons.


Return the sorted list of module names in parce.lang.

Modules that start with an underscore are skipped.


Yield the Language subclasses defined in the module name.

The module name must be one of the modules returned by :meth:get_all_modules.


Import all modules in parce.lang and yield all defined classes that inherit from Language.