[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [jdt-core-dev] start position in DOM
|
Most of our code depends on "exact" node positions. So changing this will
cause
a lot of problems in our world. If you add support for attaching comments
to nodes,
these positions should be stored in additional slots.
Our current AST rewriter does this already. It has a heuristic to assign
comments to nodes.
So moving or deleting nodes will consider those comments.
Dirk
Philippe P
Mulet/France/IBM@
IBMFR To
Sent by: jdt-core-dev@xxxxxxxxxxx
jdt-core-dev-admi cc
n@xxxxxxxxxxx
Subject
[jdt-core-dev] start position in
07/01/2003 05:11 DOM
PM
Please respond to
jdt-core-dev@ecli
pse.org
Something annoying me in our current parser implementations is that there
is no consistency in our starting positions amongst our different type of
nodes (compiler ast, dom ast, source elements, jdom).
This comes from the fact there are 2 implementations of
Parser#checkAnnotation which are subtily different. The JavaModel is
considering all comments behind previous element to be part of the next
element (taking into account trailing line comment). I would like to
generalize this behavior to others as well. The DOM only contains the
immediate leading javadoc comment, and we could enclose them all as we do
in the model.
Any comments ? I checked the spec on the DOM AST, and it is only loosely
spec'ed, so it could be evolved.
_______________________________________________
jdt-core-dev mailing list
jdt-core-dev@xxxxxxxxxxx
http://dev.eclipse.org/mailman/listinfo/jdt-core-dev