incubator-flex-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Schmalle <>
Subject Re: Flex CodeScape ...
Date Mon, 01 Oct 2012 12:24:58 GMT
Quoting Roland Zwaga <>:

> Hey Mike,
> do you think your framework could also form a basis for static analysis
> tools such as FlexPMD/CPD et al? If the parsing is so much faster than
> perhaps these existing
> tools could be re-written to use the new compiler. I myself know absolutely
> nothing about static code analysis, but perhaps folks on the list here do
> and leveraging your
> existing work could be beneficial.
> cheers,
> Roland

Actually FlexPMD was the first recursive decent parser I looked at  
years ago for ActionScript. All it did was create AST nodes for the  
actual PMD implementation.

That being said I see no reason why the PMD implementation couldn't be  
ported to use the new IDefinition API existing in the  
org.apache.flex.compiler.definition.* package.

> static code analysis

Heh, I would have to look this up on wikipedia. :) I'm good in the  
areas I'm good in. Code analysis was never anything I actually set out  
to learn.

So yes, if you can image a fully parsed source list with all the  
trimmings sitting in a class that has an API;

Collection<IFunctionDefinition> getFunctions(ITypeDefinition definition,
             String visibility, boolean inherit);

Collection<IClassDefinition> getSubClasses(IClassDefinition definition);

getInterfaceImplementors(IInterfaceDefinition definition);

Collection<IInterfaceDefinition> getSubInterfaces(IInterfaceDefinition  


Also note, there is some API in the scopes.* package that might make  
it even easier for me to do what I already am doing. I haven't taken  
the dive into that package to fully understand what it's capable of.


Michael Schmalle - Teoti Graphix, LLC

View raw message