Update 'Body'

Sasha Koshka 2022-08-24 16:36:47 +00:00
parent 09f0bfcde1
commit 13c578f28f
1 changed files with 18 additions and 1 deletions

19
Body.md

@ -1,6 +1,23 @@
# Syntax
The body section contains the actual code, as well as things like type
definitions. Every "thing" in ARF that has global scope is called a section.
[Section definitions](Section-Syntax) are hoisted so there is no need for prototyping things.
Sections start with a name token that is four letters long, and determines what
kind of section it is. It then has a permission token, and then a name which
defines the name of the section. There may be more tokens after the name
depending on what type of section it is. If the section's information does not
fit on one line, it will have an indented block underneath it with its content.
There are 6 different types of sections that ARF supports:
- objt: Object Type Definitions
- type: Blind Type Definitions
- enum: Enums
- face: Interfaces
- data: Data
- func: Functions and Methods
# Semantics
Section definitions are hoisted so there is no need for prototyping things.
All sections in a module must have a unique name within that module no matter
what kind of section it is.