Commit 6e26bb68 authored by Jakub Śpiewak's avatar Jakub Śpiewak

Fix missing annotations on fields (node translator) and methods, params, consts (capnp generator)

parent 6beb6946
...@@ -416,7 +416,8 @@ private: ...@@ -416,7 +416,8 @@ private:
proto.getName(), " :", genType(slot.getType(), interface), proto.getName(), " :", genType(slot.getType(), interface),
isEmptyValue(slot.getDefaultValue()) ? kj::strTree("") : isEmptyValue(slot.getDefaultValue()) ? kj::strTree("") :
kj::strTree(" = ", genValue( kj::strTree(" = ", genValue(
slot.getType(), slot.getDefaultValue(), interface))); slot.getType(), slot.getDefaultValue(), interface)),
genAnnotations(proto.getAnnotations(), interface));
}, ", "), ")"); }, ", "), ")");
} else { } else {
return nodeName(schema, interface); return nodeName(schema, interface);
...@@ -472,7 +473,8 @@ private: ...@@ -472,7 +473,8 @@ private:
auto results = schemaLoader.get(methodProto.getResultStructType()).asStruct(); auto results = schemaLoader.get(methodProto.getResultStructType()).asStruct();
return kj::strTree( return kj::strTree(
indent.next(), methodProto.getName(), " @", method.getIndex(), " ", 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()), genNestedDecls(schema, indent.next()),
indent, "}\n"); indent, "}\n");
...@@ -482,7 +484,8 @@ private: ...@@ -482,7 +484,8 @@ private:
return kj::strTree( return kj::strTree(
indent, "const ", name, " @0x", kj::hex(proto.getId()), " :", indent, "const ", name, " @0x", kj::hex(proto.getId()), " :",
genType(constProto.getType(), schema), " = ", genType(constProto.getType(), schema), " = ",
genValue(constProto.getType(), constProto.getValue(), schema), ";\n"); genValue(constProto.getType(), constProto.getValue(), schema),
genAnnotations(schema), ";\n");
} }
case schema::Node::ANNOTATION: { case schema::Node::ANNOTATION: {
auto annotationProto = proto.getAnnotation(); auto annotationProto = proto.getAnnotation();
......
...@@ -1295,7 +1295,7 @@ private: ...@@ -1295,7 +1295,7 @@ private:
} }
} }
builder.adoptAnnotations(translator.compileAnnotationApplications( member->getSchema().adoptAnnotations(translator.compileAnnotationApplications(
member->declAnnotations, targetsFlagName)); member->declAnnotations, targetsFlagName));
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment