5 Module Bodies

Module bodies (section 4.2) contain source code written using the syntax of the VBA programming language, as defined in this specification. This chapter defines the valid syntax, static semantic rules, and runtime semantics of module bodies.

Syntax is described using an ABNF [RFC4234] grammar incorporating terminal symbols defined in section 3. Except for where it explicitly identifies <LINE-START> and <LINE-END> elements this grammar ignores the physical line structure of files containing the source code of module bodies. The grammar also ignores conditional compilation directives and conditionally excluded sources code as described in section 3.4. This grammar applied to the preprocessed module body (section 3.4); the source code is interpreted as if both lexical tokenization and conditional compilation preprocessing has been applied to it. This preprocessing assumption is made solely to simplify and clarify this specification. An implementation is not required to actually use such a processing model.