cross-reference resolution [message #698141] |
Mon, 18 July 2011 21:32 |
amazuzu Messages: 17 Registered: May 2011 |
Junior Member |
|
|
Hi
I have following grammar
Assignments:
Assignment ({Assign.left=current} right=Assignment)*;
Assignment:
name=ID "=" INT ";";
here I define variables e.g a=5; b=6;
all I want is to see already defined variable in content assist while creating reassignment
a=5;
b=6;
...[show me 'a' and 'b' please in content assist]...=7;
Actually I expected following will works, but...
Assignment:
name=[Assignment|ID] "=" INT ";";
[Updated on: Mon, 18 July 2011 22:13] Report message to a moderator
|
|
|
|
Re: cross-reference resolution [message #699111 is a reply to message #698259] |
Wed, 20 July 2011 21:05 |
amazuzu Messages: 17 Registered: May 2011 |
Junior Member |
|
|
Hi,
thanks for your answer.
Why first mention of variable can't be treated as declaration? Ok. I followed your advice and it works.
I encounter another problem, and I feel solution will not be trivial.
In my language following statements are valid
var foo = "Hello";
log foo;
log foo.length; //note member access
log org.company.SomeClass; //returns someth like '[class SomeClass]'
How here I can distinguish member access from qualified class name? Yes, I know xtext has no semantic predicates. May be you have some thoughts.
Thank
[Updated on: Wed, 20 July 2011 21:58] Report message to a moderator
|
|
|
|
Powered by
FUDForum. Page generated in 0.04598 seconds