incubator-flex-dev mailing list archives

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

>
>
> 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);

Collection<IClassDefinition>  
getInterfaceImplementors(IInterfaceDefinition definition);

Collection<IInterfaceDefinition> getSubInterfaces(IInterfaceDefinition  
definition);

etc...


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.

Mike



-- 
Michael Schmalle - Teoti Graphix, LLC
http://www.teotigraphix.com
http://blog.teotigraphix.com


Mime
View raw message