Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
RE: [Dltk-dev] Extend SourceParser/AST flexibility in DLTK

From PDT point of view, it seems that no special issues are expected.

Thanks for the heads-up, 
Roy
-----Original Message-----
From: dltk-dev-bounces@xxxxxxxxxxx [mailto:dltk-dev-bounces@xxxxxxxxxxx] On Behalf Of Alex Panchenko
Sent: Monday, February 08, 2010 4:29 PM
To: DLTK Developer Discussions
Subject: [Dltk-dev] Extend SourceParser/AST flexibility in DLTK

Hi all,

At the moment DLTK suppose that language implementations use standard AST class hierarchy.

We would like to increase DLTK flexibility in this area, so implementations could use any AST.
This is a breaking change, so it would be better to discuss it first.

As the first step in this direction I suggest the following change:

=====

// new interface for parser output
public interface IModuleDeclaration {
  // no methods
}

public interface ISourceParser {
	IModuleDeclaration parse(org.eclipse.dltk.compiler.env.ISourceModule input, IProblemReporter reporter);
}

public class ModuleDeclaration ... implements IModuleDeclaration {
...
}

=====

The additional benefit is that parser now has access to the project via input.getModelElement().getScriptProject()

Are there any objections for this change?

Regards,
Alex
_______________________________________________
dltk-dev mailing list
dltk-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/dltk-dev

Back to the top