aboutsummaryrefslogtreecommitdiff
path: root/language/source-file.rst
blob: 162bb8832372a87438b658c13abf9fa16d47ae06 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
Source Files
------------

.. crowbar:element:: HeaderFile <- IncludeStatement* HeaderFileElement+
                     HeaderFileElement <- TypeDefinition / FunctionDeclaration / ConstantDefinition / VariableDeclaration

    A Crowbar header file defines an API boundary, either at the surface of a library or between pieces of a library or application.
    :crowbar:ref:`IncludeStatement`\ s can only appear at the beginning of the header file, and header files cannot define behavior directly.
    Conventionally, a header file has a ``.hro`` file extension.

.. crowbar:element:: ImplementationFile <- IncludeStatement* ImplementationFileElement+
                     ImplementationFileElement <- TypeDefinition / VariableDefinition / FunctionDefinition

    A Crowbar implementation file defines the actual behavior of some piece of a library or application.
    It can also define internal types, functions, and variables.
    :crowbar:ref:`IncludeStatement`\ s can only appear at the beginning of the implementation file.
    Conventionally, an implementation file has a ``.cro`` file extension.