aboutsummaryrefslogtreecommitdiff
path: root/docs/builtin.rst
blob: bb87f8cfd63f935d067314f848658b024e79f48f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
Builtin
=======

Builtin functions and builtin syntaxes are represented with
`lsp_builtin_entry_t` structures. Each entry is defined with unique
name and function pointer:

.. code-block:: c

    typedef lsp_status_t (*lsp_builtin_cb_t)(lsp_env_t *e, lsp_addr_t ctx, lsp_addr_t args);

Associated function pointer is called during function/syntax application
(described in following chapters).


Source code
-----------

builtin.h
'''''''''

.. literalinclude:: ../src_c/builtin.h
    :language: c


builtin.c
'''''''''

.. literalinclude:: ../src_c/builtin.c
    :language: c