diff options
Diffstat (limited to 'lexers/LexEDIFACT.cxx')
| -rw-r--r-- | lexers/LexEDIFACT.cxx | 23 |
1 files changed, 21 insertions, 2 deletions
diff --git a/lexers/LexEDIFACT.cxx b/lexers/LexEDIFACT.cxx index 9c1de5d77..efc9b5806 100644 --- a/lexers/LexEDIFACT.cxx +++ b/lexers/LexEDIFACT.cxx @@ -13,6 +13,8 @@ #include <cstring> #include <cctype> +#include <string> + #include "ILexer.h" #include "Scintilla.h" #include "SciLexer.h" @@ -35,7 +37,7 @@ public: int SCI_METHOD Version() const override { - return lvOriginal; + return lvIdentity; } void SCI_METHOD Release() override { @@ -73,6 +75,21 @@ public: } return -1; } + + const char * SCI_METHOD PropertyGet(const char *key) override + { + m_lastPropertyValue = ""; + if (!strcmp(key, "fold")) + { + m_lastPropertyValue = m_bFold ? "1" : "0"; + } + if (!strcmp(key, "lexer.edifact.highlight.un.all")) // GetProperty + { + m_lastPropertyValue = m_bHighlightAllUN ? "1" : "0"; + } + return m_lastPropertyValue.c_str(); + } + const char * SCI_METHOD DescribeWordListSets() override { return NULL; @@ -105,6 +122,8 @@ protected: char m_chDecimal; char m_chRelease; char m_chSegment; + + std::string m_lastPropertyValue; }; LexerModule lmEDIFACT(SCLEX_EDIFACT, LexerEDIFACT::Factory, "edifact"); @@ -115,7 +134,7 @@ LexerModule lmEDIFACT(SCLEX_EDIFACT, LexerEDIFACT::Factory, "edifact"); /////////////////////////////////////////////////////////////////////////////// -LexerEDIFACT::LexerEDIFACT() +LexerEDIFACT::LexerEDIFACT() : DefaultLexer("edifact", SCLEX_EDIFACT) { m_bFold = false; m_bHighlightAllUN = false; |
