Skip to main content

Module ast

Module ast 

Source
Expand description

AST module containing high-level VB.NET syntax tree definitions.

§VB.NET Parser for Oaks Framework

A comprehensive VB.NET parser implementation for the Oaks framework, providing lexing, parsing, and AST generation capabilities.

§Features

  • Complete VB.NET syntax support
  • Lexer for tokenizing source code
  • Parser for generating AST
  • AST builder for converting green trees to high-level AST nodes
  • Support for VB.NET-specific syntax constructs

§Usage

use oak_vbnet::parse;

fn main() {
    let source = r#"
    Imports System

    Namespace MyNamespace
        Class MyClass
            Public Sub Hello()
                Console.WriteLine("Hello, World!")
            End Sub
        End Class
    End Namespace
    "#;

    match parse(source) {
        Ok(ast) => println!("Parsed successfully: {:?}", ast),
        Err(err) => println!("Parsing error: {:?}", err),
    }
}

Structs§

Accessor
Accessor (Get/Set).
Attribute
Attribute.
CaseClause
Case clause in Select Case statement.
CatchClause
Catch clause in Try statement.
ClassDeclaration
Class declaration.
DelegateDeclaration
Delegate declaration.
ElementAccess
Element access (indexer).
EnumDeclaration
Enum declaration.
EnumMember
Enum member.
EventDeclaration
Event declaration.
FunctionDeclaration
Function declaration.
ImportsDirective
Imports directive.
InterfaceDeclaration
Interface declaration.
MemberAccess
Member access.
MethodCall
Method call.
ModuleDeclaration
Module declaration.
NamespaceDeclaration
Namespace declaration.
NewExpression
New expression.
Parameter
Parameter.
PropertyDeclaration
Property declaration.
StructureDeclaration
Structure declaration.
SubDeclaration
Subroutine declaration.
VariableDeclaration
Variable declaration.
VbNetRoot
Root node of the VB.NET AST.

Enums§

Expression
Expression.
Item
Top-level items in a VB.NET program.
Literal
Literal.
Member
Member declaration.
Statement
Statement.