LexVisualProlog: language updates; simplification & bug fix#178
LexVisualProlog: language updates; simplification & bug fix#178tholp wants to merge 0 commit intoScintillaOrg:masterfrom tholp:master
Conversation
|
I expect the most noticeable change from this PR is that string contents and the quotes around strings are now separate lexical classes with potentially different appearance. This PR undoes 94cf367 for There are other data type ( using namespace Lexilla;
namespace {
...
}
LexerModule lmVisualProlog(SCLEX_VISUALPROLOG, LexerVisualProlog::LexerFactoryVisualProlog, "visualprolog", visualPrologWordLists);
g++ and clang++ dislike |
|
Yes, that is the most "visible" change (I forgot to mention it). String and verbatim strings have same style now (what used to be the verbatim style) and the quotes have the old string style. I have updated the code according to your comments. (Putting it inside an anonymous namespace made Visual Studio reformat a number of things). |
Visual Studio puts these in a separate undo transaction and if you press Undo immediately after, just the formatting reverts. The changes show you have Visual Studio formatting options (Options | Text Editor | C/C++ | Code Style | Formatting) different from how you have previously formatted this code. I'll probably split out an initial formatting commit so the main commit is mostly behavioural changes. |
|
I assume/guess that will mean creating another PR. And then rebasing this one on top of that? |
I've not had much success with fixing things up inside the GitHub PR process. I have a copy of your end state and I'll use WinMerge to compare to a reformat (either with Visual Studio or astyle), commit that; then move other differences into a second commit. I want to make it easy to see the real differences and ignore the formatting differences. |
Default + left align pointers, space around binary operators, indented case. No semantic changes.
and SCE_VISUALPROLOG_PLACEHOLDER. Styling of string literals changed with no differentiation between literals with quotes and those that are prefixed with "@". Quote characters are in a separate style (SCE_VISUALPROLOG_STRING_QUOTE) to contents (SCE_VISUALPROLOG_STRING). SCE_VISUALPROLOG_CHARACTER, SCE_VISUALPROLOG_CHARACTER_TOO_MANY, SCE_VISUALPROLOG_CHARACTER_ESCAPE_ERROR, SCE_VISUALPROLOG_STRING_EOL_OPEN, and SCE_VISUALPROLOG_STRING_VERBATIM_SPECIAL were removed (replaced with SCE_VISUALPROLOG_UNUSED[1-5]).
|
Is there documentation that can be linked for embedded and placeholder? I couldn't find anything in the VisualProlog Language Reference. |
|
No, (currently) embedded syntax + placeholders is an undocumented feature. Unfortunately, it turned-out that placeholders always need "manual" qualification to resolve ambiguities, and that is quite cumbersome to deal with. So even though we use it ourselves, I am not sure if other people will start using it (which is of course self-fulfilling until I write some documentation (but even then)). |
This adds lexer support for embedded syntax in Visual Prolog. It also simplifies the number of states involved in the styling. And finally it deals with some bugs related to line-by-line styling and handling of line separations.
It respects the possibility to use it for other ISO/swi Prolog.