Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
D
djinni
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
cpp-libs
djinni
Commits
d5475484
Commit
d5475484
authored
Jul 18, 2018
by
Xianwen Chen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Revert "Implement comments support (#379)"
This reverts commit
0ee3da6c
.
parent
0ee3da6c
Changes
43
Hide whitespace changes
Inline
Side-by-side
Showing
43 changed files
with
72 additions
and
254 deletions
+72
-254
README.md
README.md
+0
-4
example/example.djinni
example/example.djinni
+1
-1
example/generated-src/cpp/sort_items.hpp
example/generated-src/cpp/sort_items.hpp
+1
-1
example/generated-src/java/com/dropbox/textsort/SortItems.java
...le/generated-src/java/com/dropbox/textsort/SortItems.java
+1
-1
example/generated-src/objc/TXSSortItems.h
example/generated-src/objc/TXSSortItems.h
+1
-1
src/source/ast.scala
src/source/ast.scala
+1
-7
src/source/generator.scala
src/source/generator.scala
+13
-38
src/source/parser.scala
src/source/parser.scala
+2
-55
test-suite/djinni/client_interface.djinni
test-suite/djinni/client_interface.djinni
+2
-18
test-suite/djinni/constant_enum.djinni
test-suite/djinni/constant_enum.djinni
+1
-1
test-suite/djinni/constants.djinni
test-suite/djinni/constants.djinni
+3
-7
test-suite/djinni/enum.djinni
test-suite/djinni/enum.djinni
+0
-3
test-suite/djinni/multiple_inheritance.djinni
test-suite/djinni/multiple_inheritance.djinni
+2
-2
test-suite/djinni/yaml-test.djinni
test-suite/djinni/yaml-test.djinni
+0
-2
test-suite/generated-src/cpp/client_interface.hpp
test-suite/generated-src/cpp/client_interface.hpp
+1
-4
test-suite/generated-src/cpp/client_returned_record.hpp
test-suite/generated-src/cpp/client_returned_record.hpp
+1
-1
test-suite/generated-src/cpp/color.hpp
test-suite/generated-src/cpp/color.hpp
+0
-3
test-suite/generated-src/cpp/constants.hpp
test-suite/generated-src/cpp/constants.hpp
+5
-7
test-suite/generated-src/cpp/constants_interface.hpp
test-suite/generated-src/cpp/constants_interface.hpp
+5
-3
test-suite/generated-src/cpp/extern_interface_1.hpp
test-suite/generated-src/cpp/extern_interface_1.hpp
+0
-1
test-suite/generated-src/cpp/return_two.hpp
test-suite/generated-src/cpp/return_two.hpp
+1
-1
test-suite/generated-src/cpp/reverse_client_interface.hpp
test-suite/generated-src/cpp/reverse_client_interface.hpp
+0
-16
test-suite/generated-src/cpp/second_listener.hpp
test-suite/generated-src/cpp/second_listener.hpp
+1
-1
test-suite/generated-src/java/com/dropbox/djinni/test/ClientInterface.java
...ted-src/java/com/dropbox/djinni/test/ClientInterface.java
+1
-4
test-suite/generated-src/java/com/dropbox/djinni/test/ClientReturnedRecord.java
...rc/java/com/dropbox/djinni/test/ClientReturnedRecord.java
+1
-1
test-suite/generated-src/java/com/dropbox/djinni/test/Color.java
...ite/generated-src/java/com/dropbox/djinni/test/Color.java
+0
-3
test-suite/generated-src/java/com/dropbox/djinni/test/ConstantEnum.java
...erated-src/java/com/dropbox/djinni/test/ConstantEnum.java
+1
-1
test-suite/generated-src/java/com/dropbox/djinni/test/Constants.java
...generated-src/java/com/dropbox/djinni/test/Constants.java
+5
-7
test-suite/generated-src/java/com/dropbox/djinni/test/ConstantsInterface.java
...-src/java/com/dropbox/djinni/test/ConstantsInterface.java
+5
-3
test-suite/generated-src/java/com/dropbox/djinni/test/ExternInterface1.java
...ed-src/java/com/dropbox/djinni/test/ExternInterface1.java
+0
-1
test-suite/generated-src/java/com/dropbox/djinni/test/ReturnTwo.java
...generated-src/java/com/dropbox/djinni/test/ReturnTwo.java
+1
-1
test-suite/generated-src/java/com/dropbox/djinni/test/ReverseClientInterface.java
.../java/com/dropbox/djinni/test/ReverseClientInterface.java
+0
-16
test-suite/generated-src/java/com/dropbox/djinni/test/SecondListener.java
...ated-src/java/com/dropbox/djinni/test/SecondListener.java
+1
-1
test-suite/generated-src/objc/DBClientInterface.h
test-suite/generated-src/objc/DBClientInterface.h
+1
-4
test-suite/generated-src/objc/DBClientReturnedRecord.h
test-suite/generated-src/objc/DBClientReturnedRecord.h
+1
-1
test-suite/generated-src/objc/DBColor.h
test-suite/generated-src/objc/DBColor.h
+0
-3
test-suite/generated-src/objc/DBConstantEnum.h
test-suite/generated-src/objc/DBConstantEnum.h
+1
-1
test-suite/generated-src/objc/DBConstants.h
test-suite/generated-src/objc/DBConstants.h
+5
-7
test-suite/generated-src/objc/DBConstantsInterface.h
test-suite/generated-src/objc/DBConstantsInterface.h
+5
-3
test-suite/generated-src/objc/DBExternInterface1.h
test-suite/generated-src/objc/DBExternInterface1.h
+0
-1
test-suite/generated-src/objc/DBReturnTwo.h
test-suite/generated-src/objc/DBReturnTwo.h
+1
-1
test-suite/generated-src/objc/DBReverseClientInterface.h
test-suite/generated-src/objc/DBReverseClientInterface.h
+0
-16
test-suite/generated-src/objc/DBSecondListener.h
test-suite/generated-src/objc/DBSecondListener.h
+1
-1
No files found.
README.md
View file @
d5475484
...
...
@@ -55,10 +55,6 @@ Djinni's input is an interface description file. Here's an example:
store: set<string>;
hash: map<string, i32>;
// You can generate two types of comments
// - Code comments by using "// comment" in djinni files which will generate "// comment"
// - Code documentation by using "# comment" in djinni files which will generate "/** comment */"
// Both of those types support single and multi line comments
values: list<another_record>;
# Comments can also be put here
...
...
example/example.djinni
View file @
d5475484
...
...
@@ -9,7 +9,7 @@ sort_order = enum {
}
sort_items = interface +c {
//
For the iOS / Android demo
#
For the iOS / Android demo
sort(order: sort_order, items: item_list);
static create_with_listener(listener: textbox_listener): sort_items;
...
...
example/generated-src/cpp/sort_items.hpp
View file @
d5475484
...
...
@@ -15,7 +15,7 @@ class SortItems {
public:
virtual
~
SortItems
()
{}
/
/ For the iOS / Android demo
/
** For the iOS / Android demo */
virtual
void
sort
(
sort_order
order
,
const
ItemList
&
items
)
=
0
;
static
std
::
shared_ptr
<
SortItems
>
create_with_listener
(
const
std
::
shared_ptr
<
TextboxListener
>
&
listener
);
...
...
example/generated-src/java/com/dropbox/textsort/SortItems.java
View file @
d5475484
...
...
@@ -8,7 +8,7 @@ import javax.annotation.CheckForNull;
import
javax.annotation.Nonnull
;
/*package*/
interface
SortItems
{
/
/ For the iOS / Android demo
/
** For the iOS / Android demo */
public
void
sort
(
@Nonnull
SortOrder
order
,
@Nonnull
ItemList
items
);
@CheckForNull
...
...
example/generated-src/objc/TXSSortItems.h
View file @
d5475484
...
...
@@ -10,7 +10,7 @@
@interface
TXSSortItems
:
NSObject
/
/ For the iOS / Android demo
/
** For the iOS / Android demo */
-
(
void
)
sort
:(
TXSSortOrder
)
order
items
:(
nonnull
TXSItemList
*
)
items
;
...
...
src/source/ast.scala
View file @
d5475484
...
...
@@ -35,13 +35,7 @@ class EnumValue(val ty: Ident, ident: Ident) extends Ident(ident.name, ident.fil
case
class
TypeParam
(
ident
:
Ident
)
case
class
Doc
(
comments
:
Seq
[
Comment
])
abstract
sealed
class
Comment
{
val
lines
:
Seq
[
String
]
}
case
class
CodeComment
(
override
val
lines
:
Seq
[
String
])
extends
Comment
case
class
DocComment
(
override
val
lines
:
Seq
[
String
])
extends
Comment
case
class
Doc
(
lines
:
Seq
[
String
])
sealed
abstract
class
TypeDecl
{
val
ident
:
Ident
...
...
src/source/generator.scala
View file @
d5475484
...
...
@@ -18,15 +18,12 @@ package djinni
import
djinni.ast._
import
java.io._
import
djinni.generatorTools._
import
djinni.meta._
import
djinni.syntax.Error
import
djinni.writer.IndentWriter
import
scala.language.implicitConversions
import
scala.collection.mutable
import
scala.collection.mutable.ArrayBuffer
import
scala.util.matching.Regex
package
object
generatorTools
{
...
...
@@ -428,44 +425,22 @@ abstract class Generator(spec: Spec)
def
writeMethodDoc
(
w
:
IndentWriter
,
method
:
Interface.Method
,
ident
:
IdentConverter
)
{
val
paramReplacements
=
method
.
params
.
map
(
p
=>
(
s
"\\b${Regex.quote(p.ident.name)}\\b"
,
s
"${ident(p.ident.name)}"
))
val
comments
=
ArrayBuffer
[
Comment
]()
method
.
doc
.
comments
.
foreach
({
case
DocComment
(
lines
)
=>
val
newDocComment
=
DocComment
(
lines
.
map
(
l
=>
{
paramReplacements
.
foldLeft
(
l
)((
line
,
rep
)
=>
line
.
replaceAll
(
rep
.
_1
,
rep
.
_2
))
}))
comments
+=
newDocComment
case
CodeComment
(
lines
)
=>
comments
+=
CodeComment
(
lines
)
})
val
newDoc
=
Doc
(
comments
)
val
newDoc
=
Doc
(
method
.
doc
.
lines
.
map
(
l
=>
{
paramReplacements
.
foldLeft
(
l
)((
line
,
rep
)
=>
line
.
replaceAll
(
rep
.
_1
,
rep
.
_2
))
}))
writeDoc
(
w
,
newDoc
)
}
def
writeDoc
(
w
:
IndentWriter
,
doc
:
Doc
)
{
doc
.
comments
.
foreach
({
case
DocComment
(
lines
)
=>
lines
.
length
match
{
case
0
=>
case
1
=>
w
.
wl
(
s
"/**${lines.head} */"
)
case
_
=>
w
.
wl
(
"/**"
)
lines
.
foreach
(
l
=>
w
.
wl
(
s
" *$l"
))
w
.
wl
(
" */"
)
}
case
CodeComment
(
lines
)
=>
lines
.
foreach
(
l
=>
w
.
wl
(
s
"//$l"
))
})
doc
.
lines
.
length
match
{
case
0
=>
case
1
=>
w
.
wl
(
s
"/**${doc.lines.head} */"
)
case
_
=>
w
.
wl
(
"/**"
)
doc
.
lines
.
foreach
(
l
=>
w
.
wl
(
s
" *$l"
))
w
.
wl
(
" */"
)
}
}
}
src/source/parser.scala
View file @
d5475484
...
...
@@ -16,19 +16,16 @@
package
djinni
import
java.io.
{
File
,
File
InputStream
,
FileNotFoundException
,
InputStreamReader
,
Writer
}
import
java.io.
{
File
,
File
NotFoundException
,
InputStreamReader
,
FileInputStream
,
Writer
}
import
djinni.ast.Interface.Method
import
djinni.ast.Record.DerivingType.DerivingType
import
djinni.syntax._
import
djinni.ast._
import
java.util.
{
Map
=>
JMap
}
import
org.yaml.snakeyaml.Yaml
import
scala.collection.JavaConversions._
import
scala.collection.mutable
import
scala.collection.mutable.ArrayBuffer
import
scala.util.control.Breaks._
import
scala.util.parsing.combinator.RegexParsers
import
scala.util.parsing.input.
{
Position
,
Positional
}
...
...
@@ -208,57 +205,7 @@ private object IdlParser extends RegexParsers {
case
(
s
,
p
)
=>
Ident
(
s
,
fileStack
.
top
,
p
)
}
def
doc
:
Parser
[
Doc
]
=
rep
(
regex
(
"""#[^\n\r]*"""
.
r
)
|
regex
(
"""\/\/[^\n\r]*"""
.
r
))
^^
{
commentLines
=>
val
docCommentPrefix
=
"#"
val
codeCommentPrefix
=
"//"
val
comments
=
ArrayBuffer
[
Comment
]()
commentLines
.
foreach
(
commentLine
=>
{
if
(
commentLine
.
startsWith
(
docCommentPrefix
))
{
// DocComment
val
commentText
=
commentLine
.
substring
(
docCommentPrefix
.
length
)
if
(
comments
.
isEmpty
)
{
comments
+=
DocComment
(
Seq
(
commentText
))
}
else
{
comments
.
last
match
{
case
DocComment
(
lines
)
=>
val
newLines
=
lines
:+
commentText
comments
.
remove
(
comments
.
length
-
1
)
comments
+=
DocComment
(
newLines
)
case
CodeComment
(
_
)
=>
comments
+=
DocComment
(
Seq
(
commentText
))
}
}
}
else
if
(
commentLine
.
startsWith
(
codeCommentPrefix
))
{
// CodeComment
val
commentText
=
commentLine
.
substring
(
codeCommentPrefix
.
length
)
if
(
comments
.
isEmpty
)
{
comments
+=
CodeComment
(
Seq
(
commentText
))
}
else
{
val
commentText
=
commentLine
.
substring
(
codeCommentPrefix
.
length
)
comments
.
last
match
{
case
DocComment
(
_
)
=>
comments
+=
CodeComment
(
Seq
(
commentText
))
case
CodeComment
(
lines
)
=>
val
newLines
=
lines
:+
commentText
comments
.
remove
(
comments
.
length
-
1
)
comments
+=
CodeComment
(
newLines
)
}
}
}
})
Doc
(
comments
)
}
def
doc
:
Parser
[
Doc
]
=
rep
(
regex
(
"""#[^\n\r]*"""
.
r
)
^^
(
_
.
substring
(
1
)))
^^
Doc
def
parens
[
T
](
inner
:
Parser
[
T
])
:
Parser
[
T
]
=
surround
(
"("
,
")"
,
inner
)
def
typeList
[
T
](
inner
:
Parser
[
T
])
:
Parser
[
Seq
[
T
]]
=
surround
(
"<"
,
">"
,
rep1sepend
(
inner
,
","
))
|
success
(
Seq
.
empty
)
...
...
test-suite/djinni/client_interface.djinni
View file @
d5475484
//
Record returned by a client
#
Record returned by a client
client_returned_record = record {
record_id: i64;
content: string;
misc: optional<string>;
}
//
Client interface
#
Client interface
client_interface = interface +j +o {
// Testing code comments before documentation comments
# Returns record of given string
get_record(record_id: i64, utf8string: string, misc: optional<string>): client_returned_record;
identifier_check(data: binary, r: i32, jret: i64): f64;
return_str(): string;
# Testing documentation comments before code comments
// This method takes an interface
meth_taking_interface(i: client_interface): string;
meth_taking_optional_interface(i: optional<client_interface>): string;
}
...
...
@@ -22,20 +19,7 @@ client_interface = interface +j +o {
reverse_client_interface = interface +c {
const return_str(): string;
// Testing code comments before documentation comments
// with multiple lines
// and another line
# Testing documentation comments after code comments
# with multiple lines
# and another line
meth_taking_interface(i: reverse_client_interface): string;
# Testing documentation comments before code comments
# with multiple lines
# and another line
// Testing code comments after documentation comments
// with multiple lines
// and another line
meth_taking_optional_interface(i: optional<reverse_client_interface>): string;
static create(): reverse_client_interface;
...
...
test-suite/djinni/constant_enum.djinni
View file @
d5475484
//
enum for use in constants
#
enum for use in constants
constant_enum = enum {
some_value;
some_other_value;
...
...
test-suite/djinni/constants.djinni
View file @
d5475484
...
...
@@ -8,14 +8,10 @@ constant_record = record {
constants = record {
# bool_constant has documentation.
const bool_constant: bool = true;
// i8_constant has a comment
const i8_constant: i8 = 1;
const i16_constant: i16 = 2;
const i32_constant: i32 = 3;
const i64_constant: i64 = 4;
// f64_constant has a long comment.
// (Second line of multi-line comment.
// Indented third line of multi-line comment.)
const f32_constant: f32 = 5.0;
# f64_constant has long documentation.
# (Second line of multi-line documentation.
...
...
@@ -43,7 +39,7 @@ constants = record {
};
# No support for null optional constants
//
No support for optional constant records
#
No support for optional constant records
# No support for constant binary, list, set, map
const dummy: bool = false;
...
...
@@ -83,9 +79,9 @@ constants_interface = interface +c {
some_string = string_constant
};
//
No support for null optional constants
#
No support for null optional constants
# No support for optional constant records
//
No support for constant binary, list, set, map
#
No support for constant binary, list, set, map
dummy();
}
test-suite/djinni/enum.djinni
View file @
d5475484
...
...
@@ -2,9 +2,6 @@ color = enum {
red;
orange;
yellow;
// "It is customary to list indigo as a color lying between blue and violet, but it has
// never seemed to me that indigo is worth the dignity of being considered a separate
// color. To my eyes it seems merely deep blue." --Isaac Asimov
green;
blue;
# "It is customary to list indigo as a color lying between blue and violet, but it has
...
...
test-suite/djinni/multiple_inheritance.djinni
View file @
d5475484
...
...
@@ -3,7 +3,7 @@ first_listener = interface +o {
first();
}
//
Used for ObjC multiple inheritance tests
#
Used for ObjC multiple inheritance tests
second_listener = interface +o {
second();
}
...
...
@@ -25,7 +25,7 @@ return_one = interface +c {
return_one(): i8;
}
//
Used for C++ multiple inheritance tests
#
Used for C++ multiple inheritance tests
return_two = interface +c {
static get_instance(): return_two;
return_two(): i8;
...
...
test-suite/djinni/yaml-test.djinni
View file @
d5475484
...
...
@@ -8,8 +8,6 @@ extern_record_with_derivings = record
e: test_color;
} deriving(eq, ord)
// This file tests YAML dumped by Djinni can be parsed back in
extern_interface_1 = interface +c
{
foo(i: test_client_interface): test_client_returned_record;
...
...
test-suite/generated-src/cpp/client_interface.hpp
View file @
d5475484
...
...
@@ -13,12 +13,11 @@ namespace testsuite {
struct
ClientReturnedRecord
;
/
/ Client interface
/
** Client interface */
class
ClientInterface
{
public:
virtual
~
ClientInterface
()
{}
// Testing code comments before documentation comments
/** Returns record of given string */
virtual
ClientReturnedRecord
get_record
(
int64_t
record_id
,
const
std
::
string
&
utf8string
,
const
std
::
experimental
::
optional
<
std
::
string
>
&
misc
)
=
0
;
...
...
@@ -26,8 +25,6 @@ public:
virtual
std
::
string
return_str
()
=
0
;
/** Testing documentation comments before code comments */
// This method takes an interface
virtual
std
::
string
meth_taking_interface
(
const
std
::
shared_ptr
<
ClientInterface
>
&
i
)
=
0
;
virtual
std
::
string
meth_taking_optional_interface
(
const
std
::
shared_ptr
<
ClientInterface
>
&
i
)
=
0
;
...
...
test-suite/generated-src/cpp/client_returned_record.hpp
View file @
d5475484
...
...
@@ -10,7 +10,7 @@
namespace
testsuite
{
/
/ Record returned by a client
/
** Record returned by a client */
struct
ClientReturnedRecord
final
{
int64_t
record_id
;
std
::
string
content
;
...
...
test-suite/generated-src/cpp/color.hpp
View file @
d5475484
...
...
@@ -11,9 +11,6 @@ enum class color : int {
RED
,
ORANGE
,
YELLOW
,
// "It is customary to list indigo as a color lying between blue and violet, but it has
// never seemed to me that indigo is worth the dignity of being considered a separate
// color. To my eyes it seems merely deep blue." --Isaac Asimov
GREEN
,
BLUE
,
/**
...
...
test-suite/generated-src/cpp/constants.hpp
View file @
d5475484
...
...
@@ -17,7 +17,6 @@ struct Constants final {
/** bool_constant has documentation. */
static
constexpr
bool
BOOL_CONSTANT
=
true
;
// i8_constant has a comment
static
constexpr
int8_t
I8_CONSTANT
=
1
;
static
constexpr
int16_t
I16_CONSTANT
=
2
;
...
...
@@ -26,9 +25,6 @@ struct Constants final {
static
constexpr
int64_t
I64_CONSTANT
=
4
;
// f64_constant has a long comment.
// (Second line of multi-line comment.
// Indented third line of multi-line comment.)
static
constexpr
float
F32_CONSTANT
=
5.0
f
;
/**
...
...
@@ -64,9 +60,11 @@ struct Constants final {
static
ConstantRecord
const
OBJECT_CONSTANT
;
/** No support for null optional constants */
// No support for optional constant records
/** No support for constant binary, list, set, map */
/**
* No support for null optional constants
* No support for optional constant records
* No support for constant binary, list, set, map
*/
static
constexpr
bool
DUMMY
=
false
;
};
...
...
test-suite/generated-src/cpp/constants_interface.hpp
View file @
d5475484
...
...
@@ -62,9 +62,11 @@ public:
static
ConstantRecord
const
OBJECT_CONSTANT
;
// No support for null optional constants
/** No support for optional constant records */
// No support for constant binary, list, set, map
/**
* No support for null optional constants
* No support for optional constant records
* No support for constant binary, list, set, map
*/
virtual
void
dummy
()
=
0
;
};
...
...
test-suite/generated-src/cpp/extern_interface_1.hpp
View file @
d5475484
...
...
@@ -7,7 +7,6 @@
#include "client_returned_record.hpp"
#include <memory>
// This file tests YAML dumped by Djinni can be parsed back in
class
ExternInterface1
{
public:
virtual
~
ExternInterface1
()
{}
...
...
test-suite/generated-src/cpp/return_two.hpp
View file @
d5475484
...
...
@@ -8,7 +8,7 @@
namespace
testsuite
{
/
/ Used for C++ multiple inheritance tests
/
** Used for C++ multiple inheritance tests */
class
ReturnTwo
{
public:
virtual
~
ReturnTwo
()
{}
...
...
test-suite/generated-src/cpp/reverse_client_interface.hpp
View file @
d5475484
...
...
@@ -15,24 +15,8 @@ public:
virtual
std
::
string
return_str
()
const
=
0
;
// Testing code comments before documentation comments
// with multiple lines
// and another line
/**
* Testing documentation comments after code comments
* with multiple lines
* and another line
*/
virtual
std
::
string
meth_taking_interface
(
const
std
::
shared_ptr
<
ReverseClientInterface
>
&
i
)
=
0
;
/**
* Testing documentation comments before code comments
* with multiple lines
* and another line
*/
// Testing code comments after documentation comments
// with multiple lines
// and another line
virtual
std
::
string
meth_taking_optional_interface
(
const
std
::
shared_ptr
<
ReverseClientInterface
>
&
i
)
=
0
;
static
std
::
shared_ptr
<
ReverseClientInterface
>
create
();
...
...
test-suite/generated-src/cpp/second_listener.hpp
View file @
d5475484
...
...
@@ -5,7 +5,7 @@
namespace
testsuite
{
/
/ Used for ObjC multiple inheritance tests
/
** Used for ObjC multiple inheritance tests */
class
SecondListener
{
public:
virtual
~
SecondListener
()
{}
...
...
test-suite/generated-src/java/com/dropbox/djinni/test/ClientInterface.java
View file @
d5475484
...
...
@@ -6,9 +6,8 @@ package com.dropbox.djinni.test;
import
javax.annotation.CheckForNull
;
import
javax.annotation.Nonnull
;
/
/ Client interface
/
** Client interface */
public
interface
ClientInterface
{
// Testing code comments before documentation comments
/** Returns record of given string */
@Nonnull
public
ClientReturnedRecord
getRecord
(
long
recordId
,
@Nonnull
String
utf8string
,
@CheckForNull
String
misc
);
...
...
@@ -18,8 +17,6 @@ public interface ClientInterface {
@Nonnull
public
String
returnStr
();
/** Testing documentation comments before code comments */
// This method takes an interface
@Nonnull
public
String
methTakingInterface
(
@CheckForNull
ClientInterface
i
);
...
...
test-suite/generated-src/java/com/dropbox/djinni/test/ClientReturnedRecord.java
View file @
d5475484
...
...
@@ -6,7 +6,7 @@ package com.dropbox.djinni.test;
import
javax.annotation.CheckForNull
;
import
javax.annotation.Nonnull
;
/
/ Record returned by a client
/
** Record returned by a client */
public
class
ClientReturnedRecord
{
...
...
test-suite/generated-src/java/com/dropbox/djinni/test/Color.java
View file @
d5475484
...
...
@@ -10,9 +10,6 @@ public enum Color {
RED
,
ORANGE
,
YELLOW
,
// "It is customary to list indigo as a color lying between blue and violet, but it has
// never seemed to me that indigo is worth the dignity of being considered a separate
// color. To my eyes it seems merely deep blue." --Isaac Asimov
GREEN
,
BLUE
,
/**
...
...
test-suite/generated-src/java/com/dropbox/djinni/test/ConstantEnum.java
View file @
d5475484
...
...
@@ -6,7 +6,7 @@ package com.dropbox.djinni.test;
import
javax.annotation.CheckForNull
;
import
javax.annotation.Nonnull
;
/
/ enum for use in constants
/
** enum for use in constants */
public
enum
ConstantEnum
{
SOME_VALUE
,
SOME_OTHER_VALUE
,
...
...
test-suite/generated-src/java/com/dropbox/djinni/test/Constants.java
View file @
d5475484
...
...
@@ -12,7 +12,6 @@ public class Constants {
/** bool_constant has documentation. */
public
static
final
boolean
BOOL_CONSTANT
=
true
;
// i8_constant has a comment
public
static
final
byte
I8_CONSTANT
=
1
;
public
static
final
short
I16_CONSTANT
=
2
;
...
...
@@ -21,9 +20,6 @@ public class Constants {
public
static
final
long
I64_CONSTANT
=
4
l
;
// f64_constant has a long comment.
// (Second line of multi-line comment.
// Indented third line of multi-line comment.)
public
static
final
float
F32_CONSTANT
=
5.0f
;
/**
...
...
@@ -71,9 +67,11 @@ public class Constants {
I32_CONSTANT
/* mSomeInteger */
,
STRING_CONSTANT
/* mSomeString */
);
/** No support for null optional constants */
// No support for optional constant records
/** No support for constant binary, list, set, map */
/**
* No support for null optional constants
* No support for optional constant records
* No support for constant binary, list, set, map
*/
public
static
final
boolean
DUMMY
=
false
;
...
...
test-suite/generated-src/java/com/dropbox/djinni/test/ConstantsInterface.java
View file @
d5475484
...
...
@@ -67,9 +67,11 @@ public interface ConstantsInterface {
I32_CONSTANT
/* mSomeInteger */
,
STRING_CONSTANT
/* mSomeString */
);
// No support for null optional constants
/** No support for optional constant records */
// No support for constant binary, list, set, map
/**
* No support for null optional constants
* No support for optional constant records
* No support for constant binary, list, set, map
*/
public
void
dummy
();
static
final
class
CppProxy
implements
ConstantsInterface
...
...
test-suite/generated-src/java/com/dropbox/djinni/test/ExternInterface1.java
View file @
d5475484
...
...
@@ -5,7 +5,6 @@ package com.dropbox.djinni.test;
import
java.util.concurrent.atomic.AtomicBoolean
;
// This file tests YAML dumped by Djinni can be parsed back in
public
interface
ExternInterface1
{
public
com
.
dropbox
.
djinni
.
test
.
ClientReturnedRecord
foo
(
com
.
dropbox
.
djinni
.
test
.
ClientInterface
i
);
...
...
test-suite/generated-src/java/com/dropbox/djinni/test/ReturnTwo.java
View file @
d5475484
...
...
@@ -7,7 +7,7 @@ import java.util.concurrent.atomic.AtomicBoolean;
import
javax.annotation.CheckForNull
;
import
javax.annotation.Nonnull
;
/
/ Used for C++ multiple inheritance tests
/
** Used for C++ multiple inheritance tests */
public
interface
ReturnTwo
{
public
byte
returnTwo
();
...
...
test-suite/generated-src/java/com/dropbox/djinni/test/ReverseClientInterface.java
View file @
d5475484
...
...
@@ -11,25 +11,9 @@ public interface ReverseClientInterface {
@Nonnull
public
String
returnStr
();
// Testing code comments before documentation comments
// with multiple lines
// and another line
/**
* Testing documentation comments after code comments
* with multiple lines
* and another line
*/
@Nonnull
public
String
methTakingInterface
(
@CheckForNull
ReverseClientInterface
i
);
/**
* Testing documentation comments before code comments
* with multiple lines
* and another line
*/
// Testing code comments after documentation comments
// with multiple lines
// and another line
@Nonnull
public
String
methTakingOptionalInterface
(
@CheckForNull
ReverseClientInterface
i
);
...
...
test-suite/generated-src/java/com/dropbox/djinni/test/SecondListener.java
View file @
d5475484
...
...
@@ -6,7 +6,7 @@ package com.dropbox.djinni.test;
import
javax.annotation.CheckForNull
;
import
javax.annotation.Nonnull
;
/
/ Used for ObjC multiple inheritance tests
/
** Used for ObjC multiple inheritance tests */
public
interface
SecondListener
{
public
void
second
();
}
test-suite/generated-src/objc/DBClientInterface.h
View file @
d5475484
...
...
@@ -6,10 +6,9 @@
@protocol
DBClientInterface
;
/
/ Client interface
/
** Client interface */
@protocol
DBClientInterface
// Testing code comments before documentation comments
/** Returns record of given string */
-
(
nonnull
DBClientReturnedRecord
*
)
getRecord
:(
int64_t
)
recordId
utf8string
:(
nonnull
NSString
*
)
utf8string
...
...
@@ -21,8 +20,6 @@
-
(
nonnull
NSString
*
)
returnStr
;
/** Testing documentation comments before code comments */
// This method takes an interface
-
(
nonnull
NSString
*
)
methTakingInterface
:(
nullable
id
<
DBClientInterface
>
)
i
;
-
(
nonnull
NSString
*
)
methTakingOptionalInterface
:(
nullable
id
<
DBClientInterface
>
)
i
;
...
...
test-suite/generated-src/objc/DBClientReturnedRecord.h
View file @
d5475484
...
...
@@ -3,7 +3,7 @@
#import <Foundation/Foundation.h>
/
/ Record returned by a client
/
** Record returned by a client */
@interface
DBClientReturnedRecord
:
NSObject
-
(
nonnull
instancetype
)
initWithRecordId
:(
int64_t
)
recordId
content
:(
nonnull
NSString
*
)
content
...
...
test-suite/generated-src/objc/DBColor.h
View file @
d5475484
...
...
@@ -8,9 +8,6 @@ typedef NS_ENUM(NSInteger, DBColor)
DBColorRed
,
DBColorOrange
,
DBColorYellow
,
// "It is customary to list indigo as a color lying between blue and violet, but it has
// never seemed to me that indigo is worth the dignity of being considered a separate
// color. To my eyes it seems merely deep blue." --Isaac Asimov
DBColorGreen
,
DBColorBlue
,
/**
...
...
test-suite/generated-src/objc/DBConstantEnum.h
View file @
d5475484
...
...
@@ -3,7 +3,7 @@
#import <Foundation/Foundation.h>
/
/ enum for use in constants
/
** enum for use in constants */
typedef
NS_ENUM
(
NSInteger
,
DBConstantEnum
)
{
DBConstantEnumSomeValue
,
...
...
test-suite/generated-src/objc/DBConstants.h
View file @
d5475484
...
...
@@ -27,14 +27,10 @@
/** bool_constant has documentation. */
extern
BOOL
const
DBConstantsBoolConstant
;
// i8_constant has a comment
extern
int8_t
const
DBConstantsI8Constant
;
extern
int16_t
const
DBConstantsI16Constant
;
extern
int32_t
const
DBConstantsI32Constant
;
extern
int64_t
const
DBConstantsI64Constant
;
// f64_constant has a long comment.
// (Second line of multi-line comment.
// Indented third line of multi-line comment.)
extern
float
const
DBConstantsF32Constant
;
/**
* f64_constant has long documentation.
...
...
@@ -44,7 +40,9 @@ extern float const DBConstantsF32Constant;
extern
double
const
DBConstantsF64Constant
;
extern
NSString
*
__nonnull
const
DBConstantsStringConstant
;
extern
NSString
*
__nullable
const
DBConstantsOptStringConstant
;
/** No support for null optional constants */
// No support for optional constant records
/** No support for constant binary, list, set, map */
/**
* No support for null optional constants
* No support for optional constant records
* No support for constant binary, list, set, map
*/
extern
BOOL
const
DBConstantsDummy
;
test-suite/generated-src/objc/DBConstantsInterface.h
View file @
d5475484
...
...
@@ -23,9 +23,11 @@ extern NSString * __nullable const DBConstantsInterfaceOptStringConstant;
/** Interface containing constants */
@interface
DBConstantsInterface
:
NSObject
// No support for null optional constants
/** No support for optional constant records */
// No support for constant binary, list, set, map
/**
* No support for null optional constants
* No support for optional constant records
* No support for constant binary, list, set, map
*/
-
(
void
)
dummy
;
+
(
NSNumber
*
__nullable
)
optBoolConstant
;
...
...
test-suite/generated-src/objc/DBExternInterface1.h
View file @
d5475484
...
...
@@ -6,7 +6,6 @@
#import <Foundation/Foundation.h>
// This file tests YAML dumped by Djinni can be parsed back in
@interface
DBExternInterface1
:
NSObject
-
(
nonnull
DBClientReturnedRecord
*
)
foo
:(
nullable
id
<
DBClientInterface
>
)
i
;
...
...
test-suite/generated-src/objc/DBReturnTwo.h
View file @
d5475484
...
...
@@ -5,7 +5,7 @@
@class
DBReturnTwo
;
/
/ Used for C++ multiple inheritance tests
/
** Used for C++ multiple inheritance tests */
@interface
DBReturnTwo
:
NSObject
+
(
nullable
DBReturnTwo
*
)
getInstance
;
...
...
test-suite/generated-src/objc/DBReverseClientInterface.h
View file @
d5475484
...
...
@@ -9,24 +9,8 @@
-
(
nonnull
NSString
*
)
returnStr
;
// Testing code comments before documentation comments
// with multiple lines
// and another line
/**
* Testing documentation comments after code comments
* with multiple lines
* and another line
*/
-
(
nonnull
NSString
*
)
methTakingInterface
:(
nullable
DBReverseClientInterface
*
)
i
;
/**
* Testing documentation comments before code comments
* with multiple lines
* and another line
*/
// Testing code comments after documentation comments
// with multiple lines
// and another line
-
(
nonnull
NSString
*
)
methTakingOptionalInterface
:(
nullable
DBReverseClientInterface
*
)
i
;
+
(
nullable
DBReverseClientInterface
*
)
create
;
...
...
test-suite/generated-src/objc/DBSecondListener.h
View file @
d5475484
...
...
@@ -4,7 +4,7 @@
#import <Foundation/Foundation.h>
/
/ Used for ObjC multiple inheritance tests
/
** Used for ObjC multiple inheritance tests */
@protocol
DBSecondListener
-
(
void
)
second
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment