I'm pretty far from release (at least another week :-) so I'd really
like a sanity check for the API. Any feedback would be greatly
appreciated.
Windows installers are available for Python 2.0, Python 2.1 and Python
2.2 (I haven't gotten around to a Linux build yet). There is also an
example script that can create HTML output for Python and C/C++ files.
Other than that, you will really have to read the code to figure out the
project but the code is pretty simple.
See:
http://www.sweetapp.com/silvercity
Cheers,
Brian
Not sure which level you are interested in. The _SilverCity interface
looks straightforward. There could be a script for generating language
modules or outlines of language modules from the constants: generate("CPP",
"SCE_C_*"). BTW, the verbatim lexical class that got the "XXX what is this?"
comment is for C#'s multiline verbatim strings: @"Just like
""Python"" uses
triple quotes for long texts."
Neil
Whatever level you are willing to provide :-) Really, I am trying to
make sure that my API does not make it difficult to retrieve useful
information.
> The _SilverCity interface
> looks straightforward.
Yes, it's pretty simple. I'll probably write a test suite in the next
few days that will exercise/demonstrate all of its features. The only
feature that is not demonstrated, I believe, is that PropertySets act
like mapping types e.g. propset['tab.timmy.wingy.level'] = 3
I have a Scintilla features request though:
- expose the name of the lexer in the LexerModule class (it'd like to
include the lexer's name in __repr__ and exceptions)
> There could be a script for generating language
> modules or outlines of language modules from the constants:
generate("CPP",
> "SCE_C_*").
Great idea! I don't think that the event handler names can be exactly
what I want (I like to segment identifiers by name i.e. SCE_C_COMMENTDOC
=> handle_c_comment_doc) but I think that saving me all the typing is
well worth it!
What did you think about the higher-level API? i.e. lexing to events,
the HTML generators, etc?
> BTW, the verbatim lexical class that got the "XXX what is
> this?" comment is for C#'s multiline verbatim strings:
> @"Just like ""Python"" uses triple quotes for long texts."
Cool, thanks.
Thanks a lot for the feedback, Neil!
Cheers,
Brian
Assuming you just mean moving it from private to public, OK, I'll change
that after 1.44 is released.
> What did you think about the higher-level API? i.e. lexing to events,
> the HTML generators, etc?
Not my preferred way of working. I generally prefer writing navigational
code rather than visitors or event handlers. Other people really like these
styles of interface and they are certainly popular for XML.
Neil
Thanks.
> Not my preferred way of working. I generally prefer writing
> navigational code rather than visitors or event handlers.
> Other people really like these styles of interface and they
> are certainly popular for XML.
Fair enough.
Thanks again!
Cheers,
Brian