[RD-VBAL]: VBA Language Platform Specification
Note
Cette section n'est disponible qu'en anglais.
This section is only available in English.
This specification describes the RDCore Language Platform and SDK; its inspirational source material is the MS-VBAL Open Specification. See RD-VBAL §1.0 Introduction.
RD-VBA is an implementation of the MS-VBAL specification that is independent from its historical MS-VBA runtime host. RD-VBAL is the name of the specification and documentation of the language server platform. It includes the RD-VBA language core, but covers more than the language specification alone.
🎯 The formalization of RD-VBAL is a work in progress.
This specification follows the technical prose style of its inspirational Open Spec source material.
Table of Contents
- 1.0 Introduction
- 1.1 Design and Extension Philosophy
- 1.1.1 Platform Extensions
- 1.1.2 Language Core Extensions
- 1.1.3 Core Semantic Flags
- 1.1.4 Core Diagnostics
- 1.1.5 Extension Manifest
- 1.1.6 Capabilities Provider
- 1.1 Design and Extension Philosophy
- 2.0 RD-VBA Computational Environment
- 2.0.1 Supported Languages
- 2.0.2 Client/Server Capabilities
- 2.1 Implicit Storage
- 2.2 RDPROJ Structure
- 2.2.1 Conventions
- 2.2.2 WorkspaceFile
- 2.2.3 ProjectFile
- 2.3 Application Host
- 2.3.1 Composition Root
- 2.3.2 Mode / State
- 2.4 Static Types
- 2.4.1 Intrinsic Types
- 2.4.2 Non-intrinsic Types
- 2.4.3 Meta and Advanced Types
- 2.4.4 Deferred Types
- 2.5 Runtime Values
- 2.5.1 Runtime Entities
- 2.5.2 VBTypedValue
- 2.6 Diagnostics
- 2.6.1 Syntax Errors
- 2.6.2 Semantic Compilation Errors
- 2.6.3 Runtime Errors
- 2.6.4 Rubberduck Core Diagnostics
- 2.6.5 Diagnostics Pipeline
- 3.0 Abstract Syntax Tree
- 3.0.1 Token Semantics
- 3.0.2 Node Types
- 3.0.3 Binding Contexts
- 3.1 Attributes and Directives
- 3.1.1 Attributes
- 3.2.0 Literal Expressions
- 3.3.0 Operator Expressions
- 3.3.1 Unary Operators
- 3.3.2 Arithmetic Operators — reserved
- 3.3.3 Logical (Bitwise) Operators — reserved
- 3.3.4 Relational (Comparison) Operators — reserved
- 3.4.0 Statements
- 3.4.1 Block Statements
- 3.4.2 Simple Statements
- 3.4.3 File Statements
- 3.5.0 Instructions
- 3.5.1 InstructionList
- 3.5.2 Instruction
- 3.5.3 Lowering Block Statements
- 3.5.4 Execution
- 3.5.5 Placement and Licensing
- 4.0 Program Structure and Organization
- 5.0 Semantics
- 5.1 Module Body Structure — reserved
- 5.2 Module Declaration Section Structure — reserved
- 5.2.1 Option Directives
- 5.2.2 Implicit Definition Directives
- 5.2.3 Module Declarations
- 5.2.4 Class Module Declarations
- 5.3 Module Code Section Structure — reserved
- 5.3.1 Procedure Declarations — reserved
- 5.4 Procedure Bodies and Statements
- 5.4.1 Statement Blocks — reserved
- 5.4.2 Control Statements
- 5.4.3 Data Manipulation Statements
- 5.4.4 Error Handling Statements
- 5.4.5 File Statements
- 5.5 Implicit coercion
- 5.5.1 Let-coercion
- 5.5.2 Set-coercion — reserved
- 5.6 Expressions — reserved
- 5.6.1 Expression Classifications — reserved
- 5.6.2 Expression Evaluation
- 5.6.3 Member Resolution — reserved
- 5.6.4 Expression Binding Contexts — reserved
- 5.6.5 Literal Expressions — reserved
- 5.6.6 Parenthesized Expressions
- 5.6.7 TypeOf...Is Expressions
- 5.6.8 New Expressions
- 5.6.9 Operator Expressions
- 5.6.10 Simple Name Expressions
- 5.6.11 Instance Expressions
- 5.6.12 Member Access Expressions
- 5.6.13 Index Expressions
- 5.6.14 Dictionary Access Expressions
- 5.6.15 With Expressions
- 5.6.16 Constrained Expressions
- 6.0 Standard Library
- 6.1 VBA Project
- 6.1.1 Predefined Enums
- 6.1.2 Predefined Procedural Modules
- 6.1.3 Predefined Class Modules
- 6.2 VBScript Regular Expressions
- 6.1 VBA Project
Conventions
Section numbers
| Sections | Numbering |
|---|---|
| Chapters 1–4; the overview sections 5.0 and 6.0; section 6.2 | RD-VBAL's own numbering. |
| Chapters 5 and 6, except 5.0, 6.0 and 6.2 | Mirrors MS-VBAL: RD-VBAL §N is about MS-VBAL §N. |
| An RD-VBA addition that is a variant of an MS-VBAL member | A child number of that member. GetAllJsonSettings is §6.1.2.8.1.7.1, a variant of GetAllSettings (§6.1.2.8.1.7). |
| An RD-VBA addition with no MS-VBAL counterpart | The next number after the last MS-VBAL sibling, marked 🧩. Several such additions are numbered in alphabetical order. Erl is §6.1.2.7.1.14 and the Err function is §6.1.2.7.1.15 (Information module); ErrObject.StackTrace is §6.1.3.2.2.7 (Err class properties). |
| A section number without a prefix | An RD-VBAL section. An MS-VBAL section is always written with the MS-VBAL prefix, as in MS-VBAL §5.4.2.3. |
Notes
| Note | Meaning |
|---|---|
| Reserved. This section has no content yet. | The section only reserves its number. In chapters 5 and 6, a reserved page still names the MS-VBAL section it corresponds to. When the content lives on another page, a See … line after the note links that page. |
| Not implemented. … | A limitation: what RD-VBA does not implement, and what happens instead when that is known. |
Markers
| Marker | Meaning |
|---|---|
| 🎯 | An RD-VBA objective, or a deliberate RD-VBA departure from MS-VBA. |
| 🧩 | An extension point, or an RD-VBA addition to MS-VBAL. |
| 👉 | A consequence worth calling out. |
| ✅ | Valid. |
| ❌ | Invalid. |
Intellectual Property Rights Notice for Open Specifications Documentation
Important
This documentation IS NOT A REVISION of the MS-VBAL specification.
The publisher of the RDCore platform project and of this present documentation, is claiming the rights described in the following paragraph of the Intellectual Property Rights Notice for Open Specifications Documentation section (emphasis added):
Copyrights. This documentation [MS-VBAL] is covered by Microsoft copyrights. Regardless of any other terms that are contained in the terms of use for the Microsoft website that hosts this documentation, you can make copies of it in order to develop implementations of the technologies that are described in this documentation [MS-VBAL] and can distribute portions of it in your implementations that use these technologies or in your documentation as necessary to properly document the implementation. You can also distribute in your implementation, with or without modification, any schemas, IDLs, or code samples that are included in the documentation. This permission also applies to any documents that are referenced in the Open Specifications documentation.
✅ Challenge: Accepted.