Logtalk reference manual
Built-in non-terminal: message_tokens//2
Contents > Reference Manual > Built-in Methods > message_tokens//2

## message_tokens//2

#### Description

    message_tokens(Message, Component)

User-defined non-terminal hook used to rewrite a message term into a list of tokens and declared in the `logtalk` built-in object as a public, multifile, and dynamic non-terminal. The list of tokens can be printed by calling the `print_message_tokens/3` method. This non-terminal hook is automatically called by the `print_message/3` method.

#### Template and modes

    message_tokens(+nonvar, +atom)

#### Errors

`(none)`

#### Examples

    :- multifile(logtalk::message_tokens//2).
    :- dynamic(logtalk::message_tokens//2).

    logtalk::message_tokens(redefining_entity(Type, Entity), core) -->
        ['Redefining ~w ~q'-[Type, Entity], nl].