diff options
author | Neil <nyamatongwe@gmail.com> | 2019-12-22 22:36:51 +1100 |
---|---|---|
committer | Neil <nyamatongwe@gmail.com> | 2019-12-22 22:36:51 +1100 |
commit | eed707bb9ad6da944af207a51e4a8d460d6c6846 (patch) | |
tree | b504d202eea59088f3290d8c12d3307b17e88b93 /lexers/LexJSON.cxx | |
parent | a4bd72249722211f08ffa3e65c664a9ccbbc7f84 (diff) | |
download | scintilla-mirror-eed707bb9ad6da944af207a51e4a8d460d6c6846.tar.gz |
Define ILexer5 with methods for retrieving name, ID, and property values.
Implement ILexer5 on object lexers.
Implement ILexer5 on LexerSimple wrapper for function lexers.
Diffstat (limited to 'lexers/LexJSON.cxx')
-rw-r--r-- | lexers/LexJSON.cxx | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/lexers/LexJSON.cxx b/lexers/LexJSON.cxx index 8e27bca6d..3712e931f 100644 --- a/lexers/LexJSON.cxx +++ b/lexers/LexJSON.cxx @@ -201,6 +201,7 @@ class LexerJSON : public DefaultLexer { public: LexerJSON() : + DefaultLexer("json", SCLEX_JSON), setOperators(CharacterSet::setNone, "[{}]:,"), setURL(CharacterSet::setAlphaNum, "-._~:/?#[]@!$&'()*+,),="), setKeywordJSONLD(CharacterSet::setAlpha, ":@"), @@ -208,7 +209,7 @@ class LexerJSON : public DefaultLexer { } virtual ~LexerJSON() {} int SCI_METHOD Version() const override { - return lvRelease4; + return lvRelease5; } void SCI_METHOD Release() override { delete this; @@ -228,6 +229,9 @@ class LexerJSON : public DefaultLexer { } return -1; } + const char * SCI_METHOD PropertyGet(const char *key) override { + return optSetJSON.PropertyGet(key); + } Sci_Position SCI_METHOD WordListSet(int n, const char *wl) override { WordList *wordListN = 0; switch (n) { @@ -252,7 +256,7 @@ class LexerJSON : public DefaultLexer { void *SCI_METHOD PrivateCall(int, void *) override { return 0; } - static ILexer4 *LexerFactoryJSON() { + static ILexer5 *LexerFactoryJSON() { return new LexerJSON; } const char *SCI_METHOD DescribeWordListSets() override { |