Replies: 4 comments 1 reply
-
Always nice to see new projects around AS3! Cheers! |
Beta Was this translation helpful? Give feedback.
-
I decided to copy the existing parser from my previous project which includes a nicer structure of the overall parser. However, with that, I've also changed the newly introduced syntax. ASDoc main body and tags now have location attached, which is useful when validating the comment contents. About the verifier, also called symbol solver: I was working in one for my related project, but stopped in the beginning. Infrastructures like JavaParser and Microsoft Roslyn include their own integrated symbol solver, which would be nice to have. If you're not familiar, the symbol solver would perform verification and resolve references. |
Beta Was this translation helpful? Give feedback.
-
Familiar ActionScript 3 users here may have perceived something missing in the parser; that is, proper handling of the conditional compilation syntax. I've never used that syntax in ActionScript 3, and I have merely only read a bit of ActionScript 3 code using I've fully fixed it; here's an example: package {
/**
* Comment 1 (overriden by the "Communication facility" comment).
*/
NSX::DEBUG
/**
* Communication facility.
*/
[Adherence(type = "efficient")]
/**
* Dispatched when a message is received.
*/
[Event(name = "received", type = "MessageEvent")]
public class CommunicationCenter extends EventDispatcher {
NSX::DEBUG {
protected var x: T1, y: T2, z: T3;
protected function f1(): void {}
}
NSX::RELEASE protected var w: T4;
}
} You may paste that code into the demo to see the resulting tree. Other minor fixes:
|
Beta Was this translation helpful? Give feedback.
-
Now a CSS parser is included. If anyone really uses this parser, I may add more upcoming functions from Apache Royale, such as The CSS parser parses function call contents beforehand instead of storing raw argument characters, and it does traverse the parentheses section in an error recovery friendly manner. Bugs that also tricked the head were fixed. (I've played with random punctuators and Unicode characters and something looked strange at the demo; I suddenly noticed a fatal exception in the console and fixed it in different places). Set the Another difference to Apache Royale besides the handling of function calls:
Since text may contain arbitrary characters between the call parentheses, I've updated the parser to handle them with such instead of interpreting formal tokens between the parentheses. Just to finish, I've changed the way you work with diagnostic arguments. It's now very simple: implement a trait |
Beta Was this translation helpful? Give feedback.
-
Here is a new
as3_parser
in the Rust language!Anyone can contribute tests, but I added some already
Beta Was this translation helpful? Give feedback.
All reactions