[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [jdt-core-dev] 1.5 source using a apilevel JLS2
|
I agree 2.3 is not useful. However, 2.1 is not much either. An empty
statement is a poor approximation of the tree, and we have to come up with
similar strategies for cases where offending nodes are not entire
statements, think of: new A<B>() for instance, where only the type
reference could be malformed. We could then convert it to new A() and tag
it as malformed...
Note that 2.2 introduces some inconsistencies, but since these are tagged
as malformed, clients may prefer these anyway. In a general fashion
malformed nodes do not guarantee much. For instance, you may chose to
traverse them at your own risks.
So 2.1 is more consistent, and 2.2 is more informative.
Maybe clients should speak up a bit ?
Jerome
Lanneluc/France/I
BM@IBMFR To
Sent by: jdt-core-dev@xxxxxxxxxxx
jdt-core-dev-admi cc
n@xxxxxxxxxxx
Subject
Re: [jdt-core-dev] 1.5 source using
06/15/2004 10:51 a apilevel JLS2
AM
Please respond to
jdt-core-dev
I would say option 2.2 is no go: you cannot know anything about JLS3 in a
JLS2 world. Between 2.1 and 2.3, I prefer 2.1 as creating a MALFORMED node
is closer to the spec (see ASTParser#setKind()) and it allows clients to
still traverse the JLS2 nodes. With option 2.3 you end up with a not very
useful parent subtree.
Jerome
Olivier Thomann
<Olivier_Thomann@
ca.ibm.com> To
Sent by: jdt-core-dev@xxxxxxxxxxx
jdt-core-dev-admi cc
n@xxxxxxxxxxx
Subject
[jdt-core-dev] 1.5 source using a
06/14/2004 08:11 apilevel JLS2
PM
Please respond to
jdt-core-dev
Hi,
Here is the start of a discussion in order to determine what should be the
resulting tree when a DOM/AST tree is created using a compilation unit that
contains 1.5 constructs and an api level JLS2. The 1.5 nodes don't exist in
JLS2. Using JLS3 apilevel, this is not an issue since all new 1.5
constructs are available.
See the attached document and please give us your feedback.
Thanks,
Olivier[attachment "documentfor59052.txt" deleted by Jerome
Lanneluc/France/IBM]
_______________________________________________
jdt-core-dev mailing list
jdt-core-dev@xxxxxxxxxxx
http://dev.eclipse.org/mailman/listinfo/jdt-core-dev