Problems with formatting rules [message #872621] |
Wed, 16 May 2012 09:31  |
Eclipse User |
|
|
|
Hi!
I have been starting with implementing an XText Plugin for a Script Language.
Some basic lines would look like:
on init
declare $FOO
end on
function BAR
<do stuff>
end function
I first wanted to have a look after the formatting possibilities of the editor because this language doesn't need and package structures, inheritances or even a compiler, basically editing purposes are needed...
I wanted to overwrite the "AbstractDeclarativeFormatter" for my own rules but I don't know how I can format the displayed function.
SCRIPTFILE:
'on' 'init'
(declarations+=DECLARATIONS)*
'end' 'on'
('function' funcName+=ID
(assignments+=ASSIGNMENTS)*
'end' 'function')*
;
is my basic attempt to layout the grammar, by calling getSCRIPTFILEAccess() I can get the feature name of the function "BAR" but not the value which I could need to make an .after(pair.getSecond()) call.
Does anyone have any solution for me?
Thanks in advance,
A
|
|
|
|
Powered by
FUDForum. Page generated in 0.03822 seconds