aboutsummaryrefslogtreecommitdiff
path: root/language/index.rst
diff options
context:
space:
mode:
Diffstat (limited to 'language/index.rst')
-rw-r--r--language/index.rst26
1 files changed, 26 insertions, 0 deletions
diff --git a/language/index.rst b/language/index.rst
new file mode 100644
index 0000000..79702c5
--- /dev/null
+++ b/language/index.rst
@@ -0,0 +1,26 @@
+Language
+========
+
+The syntax of Crowbar is designed to be similar to the syntax of C.
+
+A Crowbar source file is UTF-8.
+Crowbar source files can come in two varieties:
+
+.. glossary::
+
+ header file
+ A Crowbar source file declaring types and functions.
+ Can be intended for internal use within a project, or to define the public API of a library.
+ Conventionally has the ``.hro`` file extension.
+
+ implementation file
+ A Crowbar source file providing function definitions, and sometimes its own type declarations.
+ Conventionally has the ``.cro`` file extension.
+
+A Crowbar source file is read into memory in two phases: *scanning* (which converts text into an unstructured sequence of tokens) and *parsing* (which converts an unstructured sequence of tokens into a parse tree).
+
+.. toctree::
+ :maxdepth: 1
+
+ scanning
+ flow-control