Support clojure's "@" macro with brackets
ClosedPublic

Authored by koichia on Sep 17 2017, 2:03 PM.

Details

Summary

This change will fix clojure's syntax highlighting like the following code:

(@(.state this) k)

Currently, @(.state is recognized as a reader macro, but it has to consider brackets.

Diff Detail

Repository
R216 Syntax Highlighting
Lint
Lint Skipped
Unit
Unit Tests Skipped
koichia created this revision.Sep 17 2017, 2:03 PM
Restricted Application added a project: Frameworks. · View Herald TranscriptSep 17 2017, 2:03 PM
Restricted Application added a subscriber: Frameworks. · View Herald Transcript
koichia edited the summary of this revision. (Show Details)Sep 17 2017, 2:23 PM
dhaumann requested changes to this revision.Sep 18 2017, 6:45 AM
dhaumann added a subscriber: dhaumann.

In general looks good, but 2 issues:

  1. Please increase the version number in the lab xml element.
  2. Please extend the unit test here: https://github.com/KDE/syntax-highlighting/blob/master/autotests/input/clojure.clj
This revision now requires changes to proceed.Sep 18 2017, 6:45 AM
koichia updated this revision to Diff 19632.Sep 18 2017, 10:32 AM

Hi,

I updated the patch.

However, some errors happen in clojure's test.
These errors also happened in the previous revision.

    Start 1: appstreamtest
1/9 Test #1: appstreamtest ....................   Passed    0.02 sec
    Start 2: wildcardmatcher_test
2/9 Test #2: wildcardmatcher_test .............   Passed    0.01 sec
    Start 3: syntaxrepository_test
3/9 Test #3: syntaxrepository_test ............   Passed    0.46 sec
    Start 4: theme_test
4/9 Test #4: theme_test .......................   Passed    0.01 sec
    Start 5: testhighlighter_test
5/9 Test #5: testhighlighter_test .............***Failed    1.80 sec
    Start 6: htmlhighlighter_test
6/9 Test #6: htmlhighlighter_test .............   Passed    2.13 sec
    Start 7: folding_test
7/9 Test #7: folding_test .....................   Passed    2.52 sec
    Start 8: highlighter_benchmark
8/9 Test #8: highlighter_benchmark ............   Passed    3.06 sec
    Start 9: repository_benchmark
9/9 Test #9: repository_benchmark .............   Passed    0.31 sec

build/Testing/Temporary/LastTest.log:

QWARN  : TestHighlighterTest::testHighlight(clojure.clj) org.kde.ksyntaxhighlighting: Unknown format "String Char" in context "String" of definition "Clojure"
QWARN  : TestHighlighterTest::testHighlight(clojure.clj) org.kde.ksyntaxhighlighting: Unknown format "String Char" in context "String" of definition "Clojure"
QWARN  : TestHighlighterTest::testHighlight(clojure.clj) org.kde.ksyntaxhighlighting: Unknown format "DocumentationPossible" in context "DocumentationPossible" of definition "Clojure"
QWARN  : TestHighlighterTest::testHighlight(clojure.clj) org.kde.ksyntaxhighlighting: Unknown format "String Char" in context "String" of definition "Clojure"
QWARN  : TestHighlighterTest::testHighlight(clojure.clj) org.kde.ksyntaxhighlighting: Unknown format "String Char" in context "String" of definition "Clojure"
QWARN  : TestHighlighterTest::testHighlight(clojure.clj) org.kde.ksyntaxhighlighting: Unknown format "DocumentationPossible" in context "DocumentationPossible" of definition "Clojure"
QWARN  : TestHighlighterTest::testHighlight(clojure.clj) org.kde.ksyntaxhighlighting: Unknown format "Documentation Char" in context "Documentation" of definition "Clojure"
QWARN  : TestHighlighterTest::testHighlight(clojure.clj) org.kde.ksyntaxhighlighting: Unknown format "Documentation Char" in context "Documentation" of definition "Clojure"
....
....
FAIL!  : TestHighlighterTest::cleanupTestCase() 'coveredList.open(QFile::WriteOnly)' returned FALSE. ()
   Loc: [/home/koichi/Desktop/kde-syntax-highlighting/syntax-highlighting/autotests/testhighlighter.cpp(103)]
This revision is now accepted and ready to land.Sep 18 2017, 3:36 PM
dhaumann closed this revision.Sep 18 2017, 3:36 PM