Skip to content

Commit

Permalink
Support Dart, issue #151.
Browse files Browse the repository at this point in the history
  • Loading branch information
zufuliu committed Dec 19, 2020
1 parent e9c0337 commit b3b88ff
Show file tree
Hide file tree
Showing 15 changed files with 849 additions and 5 deletions.
2 changes: 2 additions & 0 deletions build/CodeLite/Notepad2.project
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
<File Name="../../scintilla/lexers/LexConfig.cxx"/>
<File Name="../../scintilla/lexers/LexCPP.cxx"/>
<File Name="../../scintilla/lexers/LexCSS.cxx"/>
<File Name="../../scintilla/lexers/LexDart.cxx"/>
<File Name="../../scintilla/lexers/LexDiff.cxx"/>
<File Name="../../scintilla/lexers/LexFortran.cxx"/>
<File Name="../../scintilla/lexers/LexFSharp.cxx"/>
Expand Down Expand Up @@ -181,6 +182,7 @@
<File Name="../../src/EditLexers/stlCSharp.c"/>
<File Name="../../src/EditLexers/stlCSS.c"/>
<File Name="../../src/EditLexers/stlD.c"/>
<File Name="../../src/EditLexers/stlDart.c"/>
<File Name="../../src/EditLexers/stlDefault.c"/>
<File Name="../../src/EditLexers/stlFortran.c"/>
<File Name="../../src/EditLexers/stlFSharp.c"/>
Expand Down
2 changes: 2 additions & 0 deletions build/VS2017/Notepad2.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -970,6 +970,7 @@
<ClCompile Include="..\..\scintilla\lexers\LexConfig.cxx" />
<ClCompile Include="..\..\scintilla\lexers\LexCPP.cxx" />
<ClCompile Include="..\..\scintilla\lexers\LexCSS.cxx" />
<ClCompile Include="..\..\scintilla\lexers\LexDart.cxx" />
<ClCompile Include="..\..\scintilla\lexers\LexDiff.cxx" />
<ClCompile Include="..\..\scintilla\lexers\LexFortran.cxx" />
<ClCompile Include="..\..\scintilla\lexers\LexFSharp.cxx" />
Expand Down Expand Up @@ -1073,6 +1074,7 @@
<ClCompile Include="..\..\src\EditLexers\stlCSharp.c" />
<ClCompile Include="..\..\src\EditLexers\stlCSS.c" />
<ClCompile Include="..\..\src\EditLexers\stlD.c" />
<ClCompile Include="..\..\src\EditLexers\stlDart.c" />
<ClCompile Include="..\..\src\EditLexers\stlDefault.c" />
<ClCompile Include="..\..\src\EditLexers\stlFortran.c" />
<ClCompile Include="..\..\src\EditLexers\stlFSharp.c" />
Expand Down
6 changes: 6 additions & 0 deletions build/VS2017/Notepad2.vcxproj.filters
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,9 @@
<ClCompile Include="..\..\scintilla\lexers\LexCSS.cxx">
<Filter>Scintilla\lexers</Filter>
</ClCompile>
<ClCompile Include="..\..\scintilla\lexers\LexDart.cxx">
<Filter>Scintilla\lexers</Filter>
</ClCompile>
<ClCompile Include="..\..\scintilla\lexers\LexDiff.cxx">
<Filter>Scintilla\lexers</Filter>
</ClCompile>
Expand Down Expand Up @@ -375,6 +378,9 @@
<ClCompile Include="..\..\src\EditLexers\stlD.c">
<Filter>Source Files\EditLexers</Filter>
</ClCompile>
<ClCompile Include="..\..\src\EditLexers\stlDart.c">
<Filter>Source Files\EditLexers</Filter>
</ClCompile>
<ClCompile Include="..\..\src\EditLexers\stlDefault.c">
<Filter>Source Files\EditLexers</Filter>
</ClCompile>
Expand Down
4 changes: 4 additions & 0 deletions doc/FileExt.txt
Original file line number Diff line number Diff line change
Expand Up @@ -222,11 +222,15 @@ Config File
Doxyfile Doxygen Configuration
.* dot-file


D Source
d
di D Interface File
dd Ddoc Source File

Dart Source
dart

Diff File
diff
patch
Expand Down
Binary file modified doc/Notepad2 DarkTheme.ini
Binary file not shown.
33 changes: 33 additions & 0 deletions scintilla/include/SciLexer.h
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@
#define SCLEX_TOML 214
#define SCLEX_GN 215
#define SCLEX_GO 216
#define SCLEX_DART 217
#define SCLEX_AUTOMATIC 1000
#define SCE_PY_DEFAULT 0
#define SCE_PY_COMMENTLINE 1
Expand Down Expand Up @@ -1041,4 +1042,36 @@
#define SCE_GO_FORMAT_SPECIFIER 21
#define SCE_GO_TASK_MARKER 22
#define SCE_GO_TASK_MARKER_LINE 23
#define SCE_DART_DEFAULT 0
#define SCE_DART_COMMENTLINE 1
#define SCE_DART_COMMENTLINEDOC 2
#define SCE_DART_COMMENTBLOCK 3
#define SCE_DART_COMMENTBLOCKDOC 4
#define SCE_DART_NUMBER 5
#define SCE_DART_OPERATOR 6
#define SCE_DART_OPERATOR2 7
#define SCE_DART_IDENTIFIER 8
#define SCE_DART_STRING_SQ 9
#define SCE_DART_STRING_DQ 10
#define SCE_DART_TRIPLE_SQ_STRING 11
#define SCE_DART_TRIPLE_DQ_STRING 12
#define SCE_DART_ESCAPECHAR 13
#define SCE_DART_RAWSTRING_SQ 14
#define SCE_DART_RAWSTRING_DQ 15
#define SCE_DART_TRIPLE_RAWSTRING_SQ 16
#define SCE_DART_TRIPLE_RAWSTRING_DQ 17
#define SCE_DART_TRIPLE_SQ_STRINGSTART 18
#define SCE_DART_TRIPLE_DQ_STRINGSTART 19
#define SCE_DART_TRIPLE_SQ_STRINGEND 20
#define SCE_DART_TRIPLE_DQ_STRINGEND 21
#define SCE_DART_SYMBOL_OPERATOR 22
#define SCE_DART_SYMBOL_IDENTIFIER 23
#define SCE_DART_VARIABLE 24
#define SCE_DART_METADATA 25
#define SCE_DART_LABEL 26
#define SCE_DART_FUNCTION 27
#define SCE_DART_WORD 28
#define SCE_DART_WORD2 29
#define SCE_DART_CLASS 30
#define SCE_DART_ENUM 31
/* --Autogenerated -- end of section automatically generated from SciLexer.iface */
35 changes: 35 additions & 0 deletions scintilla/include/SciLexer.iface
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,7 @@ val SCLEX_WASM=213
val SCLEX_TOML=214
val SCLEX_GN=215
val SCLEX_GO=216
val SCLEX_DART=217

# When a lexer specifies its language as SCLEX_AUTOMATIC it receives a
# value assigned in sequence from SCLEX_AUTOMATIC+1.
Expand Down Expand Up @@ -2602,3 +2603,37 @@ val SCE_GO_FUNCTION_DEFINE=20
val SCE_GO_FORMAT_SPECIFIER=21
val SCE_GO_TASK_MARKER=22
val SCE_GO_TASK_MARKER_LINE=23
# Lexical states for SCLEX_DART
lex DART=SCLEX_DART SCE_DART_
val SCE_DART_DEFAULT=0
val SCE_DART_COMMENTLINE=1
val SCE_DART_COMMENTLINEDOC=2
val SCE_DART_COMMENTBLOCK=3
val SCE_DART_COMMENTBLOCKDOC=4
val SCE_DART_NUMBER=5
val SCE_DART_OPERATOR=6
val SCE_DART_OPERATOR2=7
val SCE_DART_IDENTIFIER=8
val SCE_DART_STRING_SQ=9
val SCE_DART_STRING_DQ=10
val SCE_DART_TRIPLE_SQ_STRING=11
val SCE_DART_TRIPLE_DQ_STRING=12
val SCE_DART_ESCAPECHAR=13
val SCE_DART_RAWSTRING_SQ=14
val SCE_DART_RAWSTRING_DQ=15
val SCE_DART_TRIPLE_RAWSTRING_SQ=16
val SCE_DART_TRIPLE_RAWSTRING_DQ=17
val SCE_DART_TRIPLE_SQ_STRINGSTART=18
val SCE_DART_TRIPLE_DQ_STRINGSTART=19
val SCE_DART_TRIPLE_SQ_STRINGEND=20
val SCE_DART_TRIPLE_DQ_STRINGEND=21
val SCE_DART_SYMBOL_OPERATOR=22
val SCE_DART_SYMBOL_IDENTIFIER=23
val SCE_DART_VARIABLE=24
val SCE_DART_METADATA=25
val SCE_DART_LABEL=26
val SCE_DART_FUNCTION=27
val SCE_DART_WORD=28
val SCE_DART_WORD2=29
val SCE_DART_CLASS=30
val SCE_DART_ENUM=31
Loading

0 comments on commit b3b88ff

Please sign in to comment.