| Crates.io | oak-actionscript |
| lib.rs | oak-actionscript |
| version | 0.0.1 |
| created_at | 2025-10-20 09:59:13.466553+00 |
| updated_at | 2026-01-23 04:14:32.912753+00 |
| description | High-performance incremental ActionScript parser for the oak ecosystem with flexible configuration, supporting modern ActionScript features and Flash development. |
| homepage | https://github.com/ygg-lang/oaks |
| repository | https://github.com/ygg-lang/oaks |
| max_upload_size | |
| id | 1891701 |
| size | 140,870 |
High-performance incremental ActionScript parser for the oak ecosystem with flexible configuration, optimized for Adobe Flash and Apache Flex development.
Oak ActionScript is a robust parser for ActionScript 3.0, designed to handle both legacy Flash and modern Flex applications. Built on the solid foundation of oak-core, it provides both high-level convenience and detailed AST generation for ActionScript analysis and tooling.
Basic example:
use oak_actionscript::{Parser, ActionScriptLanguage, SourceText};
fn main() -> Result<(), Box<dyn std::error::Error>> {
let parser = Parser::new();
let source = SourceText::new(r#"
package com.example {
public class Main {
public function Main() {
trace("Hello, ActionScript!");
}
}
}
"#);
let result = parser.parse(&source);
println!("Parsed ActionScript package successfully.");
Ok(())
}
use oak_actionscript::{Parser, ActionScriptLanguage, SourceText};
let parser = Parser::new();
let source = SourceText::new(r#"
public class MovieClip extends flash.display.MovieClip {
private var frameCount:int;
public function MovieClip() {
frameCount = 0;
}
public function play():void {
super.play();
}
}
"#);
let result = parser.parse(&source);
println!("Parsed ActionScript class successfully.");
use oak_actionscript::{Parser, ActionScriptLanguage, SourceText};
let parser = Parser::new();
let source = SourceText::new(r#"
public function calculateArea(width:Number, height:Number):Number {
return width * height;
}
"#);
let result = parser.parse(&source);
println!("Parsed ActionScript function successfully.");
use oak_actionscript::{Parser, ActionScriptLanguage, SourceText};
let parser = Parser::new();
let source = SourceText::new("public function test():void {}");
let result = parser.parse(&source);
// Token information is available in the parse result
use oak_actionscript::{Parser, ActionScriptLanguage, SourceText};
let parser = Parser::new();
let source = SourceText::new(r#"
package {
public class Test {
public function test( {
trace("Missing closing parenthesis");
}
}
}
"#);
let result = parser.parse(&source);
if let Err(e) = result.result {
println!("Parse error: {:?}", e);
}
The parser generates a comprehensive AST with the following main structures:
Oak of actionscript integrates seamlessly with:
Check out the examples directory for comprehensive examples:
Contributions are welcome!
Please feel free to submit pull requests at the project repository or open issues.