Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
C
capnproto
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
capnproto
Commits
e9481681
Commit
e9481681
authored
Jan 02, 2014
by
Kenton Varda
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #62 from jmspiewak/master
Fix missing annotations
parents
4f4c5a01
6e26bb68
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
6 deletions
+9
-6
capnpc-capnp.c++
c++/src/capnp/compiler/capnpc-capnp.c++
+6
-3
node-translator.c++
c++/src/capnp/compiler/node-translator.c++
+1
-1
language.md
doc/language.md
+2
-2
No files found.
c++/src/capnp/compiler/capnpc-capnp.c++
View file @
e9481681
...
...
@@ -416,7 +416,8 @@ private:
proto
.
getName
(),
" :"
,
genType
(
slot
.
getType
(),
interface
),
isEmptyValue
(
slot
.
getDefaultValue
())
?
kj
::
strTree
(
""
)
:
kj
::
strTree
(
" = "
,
genValue
(
slot
.
getType
(),
slot
.
getDefaultValue
(),
interface
)));
slot
.
getType
(),
slot
.
getDefaultValue
(),
interface
)),
genAnnotations
(
proto
.
getAnnotations
(),
interface
));
},
", "
),
")"
);
}
else
{
return
nodeName
(
schema
,
interface
);
...
...
@@ -472,7 +473,8 @@ private:
auto
results
=
schemaLoader
.
get
(
methodProto
.
getResultStructType
()).
asStruct
();
return
kj
::
strTree
(
indent
.
next
(),
methodProto
.
getName
(),
" @"
,
method
.
getIndex
(),
" "
,
genParamList
(
interface
,
params
),
" -> "
,
genParamList
(
interface
,
results
),
";
\n
"
);
genParamList
(
interface
,
params
),
" -> "
,
genParamList
(
interface
,
results
),
genAnnotations
(
methodProto
.
getAnnotations
(),
interface
),
";
\n
"
);
},
genNestedDecls
(
schema
,
indent
.
next
()),
indent
,
"}
\n
"
);
...
...
@@ -482,7 +484,8 @@ private:
return
kj
::
strTree
(
indent
,
"const "
,
name
,
" @0x"
,
kj
::
hex
(
proto
.
getId
()),
" :"
,
genType
(
constProto
.
getType
(),
schema
),
" = "
,
genValue
(
constProto
.
getType
(),
constProto
.
getValue
(),
schema
),
";
\n
"
);
genValue
(
constProto
.
getType
(),
constProto
.
getValue
(),
schema
),
genAnnotations
(
schema
),
";
\n
"
);
}
case
schema
:
:
Node
::
ANNOTATION
:
{
auto
annotationProto
=
proto
.
getAnnotation
();
...
...
c++/src/capnp/compiler/node-translator.c++
View file @
e9481681
...
...
@@ -1295,7 +1295,7 @@ private:
}
}
builder
.
adoptAnnotations
(
translator
.
compileAnnotationApplications
(
member
->
getSchema
()
.
adoptAnnotations
(
translator
.
compileAnnotationApplications
(
member
->
declAnnotations
,
targetsFlagName
));
}
...
...
doc/language.md
View file @
e9481681
...
...
@@ -481,7 +481,7 @@ $baz(1); # Annotate the file.
struct MyStruct $baz(2) {
myField @0 :Text = "default" $baz(3);
myUnion
@1
union $baz(4) {
myUnion
:
union $baz(4) {
# ...
}
}
...
...
@@ -491,7 +491,7 @@ enum MyEnum $baz(5) {
}
interface MyInterface $baz(7) {
myMethod
(myParam :Text $baz(9)) :Void
$baz(8);
myMethod
@0 (myParam :Text $baz(9)) -> ()
$baz(8);
}
annotation myAnnotation(struct) :Int32 $baz(10);
...
...
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