Skip to main content

Crate oak_vbnet

Crate oak_vbnet 

Source
Expand description

§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),
    }
}

Re-exports§

pub use ast::VbNetRoot;
pub use builder::VbNetBuilder;
pub use language::VbNetLanguage;
pub use lexer::VbNetLexer;
pub use lexer::token_type::VbNetTokenType;
pub use parser::VbNetParser;

Modules§

ast
AST module containing high-level VB.NET syntax tree definitions.
builder
Builder module for converting green trees into high-level AST nodes.
language
Language definition and configuration for VB.NET.
lexer
Lexer implementation for VB.NET.
parser
Parser implementation for VB.NET.

Functions§

parse
Parses VB.NET source code into a VbNetRoot AST.
parse_with_cache
Parses VB.NET source code into a VbNetRoot AST using a caching parse session.