Skip to content

Commit

Permalink
feat(internal/lang): 添加对 dart 的支持
Browse files Browse the repository at this point in the history
update #11
  • Loading branch information
caixw committed Jul 4, 2020
1 parent 41221f6 commit d68745f
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
[![license](https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat)](https://opensource.org/licenses/MIT)

apidoc 是一个简单的 RESTful API 文档生成工具,它从代码注释中提取特定格式的内容,生成文档。
目前支持支持以下语言:C#、C/C++、D、Erlang、Go、Groovy、Java、JavaScript、Pascal/Delphi、
目前支持支持以下语言:C#、C/C++、D、Dart、Erlang、Go、Groovy、Java、JavaScript、Pascal/Delphi、
Perl、PHP、Python、Ruby、Rust、Scala 和 Swift。

具体文档可参考:<https://apidoc.tools>
Expand Down
2 changes: 1 addition & 1 deletion docs/example/index.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>

<?xml-stylesheet type="text/xsl" href="../v6/apidoc.xsl"?>
<apidoc apidoc="6.1.0" created="2020-07-03T20:44:39+08:00" version="1.1.1">
<apidoc apidoc="6.1.0" created="2020-07-04T12:27:04+08:00" version="1.1.1">
<title>示例文档</title>
<description type="html"><![CDATA[
<p>这是一个用于测试的文档用例</p>
Expand Down
1 change: 1 addition & 0 deletions docs/site.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
<language id="c#">C#</language>
<language id="c++">C/C++</language>
<language id="d">D</language>
<language id="dart">Dart</language>
<language id="erlang">Erlang</language>
<language id="go">Go</language>
<language id="groovy">Groovy</language>
Expand Down
2 changes: 1 addition & 1 deletion internal/docs/static.go

Large diffs are not rendered by default.

18 changes: 18 additions & 0 deletions internal/lang/lang.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,24 @@ var langs = []*Language{
Blocks: cStyle,
},

{
DisplayName: "Dart",
ID: "dart",
Exts: []string{".dart"},
Blocks: []Blocker{
newCStyleString(),
newString("'", "'", `\`),
newString("r'", "'", ``),
newString("r\"", "\"", ``),
newString("'''", "'''", ``),
newString(`"""`, `"""`, ``),
newSingleComment(`///`),
newSwiftNestMCommentBlock("/**", "*/", "*"),
newCStyleSingleComment(),
newCStyleMultipleComment(),
},
},

{
DisplayName: "Erlang",
ID: "erlang",
Expand Down

0 comments on commit d68745f

Please sign in to comment.