Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [xtext-dev] scope delimiter keword's (SDKS)

Hi Michael,

sorry for the late response. I think we should discuss things in english so that we do not exclude any interested spectators. Your question was whether we should come up with something like 'scope delimiter keywords' (like e.g, '{' and '}'), which are explicitly declared in the grammar.

I see the following things where this information could be reused:

- provide better default scoping (we don't yet provide default scopes at all)
 - provide better default fragments (i.e. qualified names)
- provide auto edit facilities (automatic inserting the closing bracket) -- this is what you were thinking of, right?
 - folding could use this information
 - serialization / formatting could use the information for indentation
Any additions?

On the downside, I think we would heavily overload the term 'scope' when using the information for so many different things (but, hey, this is abstraction ;-)). More important, the grammar language grows and grows, and I get the feeling that we should try to separate things.

Why not defining another language service (e.g. 'IScopingService') which can be implemented as fits, and the default implementation uses '{' '}' as scope delimiters?

I'ld propose something like this:

IScopingService {
    boolean isScopeStart(AbstractElement ele);
    boolean isScopeEnd(AbstractElement ele);
}

What do you think?

Sven


On Jul 23, 2008, at 10:43 PM, michael clay wrote:

hallo,

keine ahnung ob das die richtige bezeichnung ist aber ich nenne sie
einfach mal 'scope delimiter kewords' (SDKS)  z.B.  {} () [] usw.

meine frage: koennen wir fuer diese SDKS einen optionalen hint in die
xtext grammatik mitaufnehmen damit ich diese im contentassist
erkenne und automatisch einfuege sodass sie der anwender nicht mehr
extra eingeben/auswaehlen muss?

danke
michael
_______________________________________________
xtext-dev mailing list
xtext-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/xtext-dev



Back to the top