[nem-en] Completion
Kamil Skalski
kamil.skalski at gmail.com
Mon Jun 5 18:05:22 CEST 2006
2006/6/5, vc <vc at rsdn.ru>:
> > > 1. I try use completion for the following strings:
> > > try_completion ("Fo");
> > > try_completion ("");
> > > try_completion ("def _ = 0; ");
> > >
> > I'm trying to see what happens in those situations. Although the second
> > and third one may require changes to the compiler itself.
>
> Hm... What tell about this compiler guys?
> My skills in Nemerle not enough for changing compiler logic. :)
I will try to take a look at this later.
>
> > Also, remember that Completion Engine does not show keywords.
>
> It's no problem because it's a simple static list. But I need to know how to
> receive the list of extending syntax macro.
In GlobalEnv there is:
/// this is a map of keywords, which trigger syntax extensions
public SyntaxKeywords : Map [string, GrammarElement];
/// this is a set of keywords present in current global environment
public Keywords : Set [string];
GlobalEnv are created in PreParser basing on 'using NameSpace;' and
'namespace My { ... }' declarations.
The example of using GrammarElement is in
ncc/parsing/MainParser-Extensions.n, in particular there is
parse_top_extensions (modifiers : Modifiers, target : MacroTargets) : void
and
parse_grammar_rule (tree : GrammarElement, stop : TokenStoppers,
target : MacroTargets) : GrammarElement * list [SyntaxElement]
--
Kamil Skalski
http://nazgul.omega.pl
More information about the devel-en
mailing list