3 Body
Sasha Koshka edited this page 2022-08-24 16:36:47 +00:00

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.

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.