Commit e9481681 authored by Kenton Varda's avatar Kenton Varda

Merge pull request #62 from jmspiewak/master

Fix missing annotations
parents 4f4c5a01 6e26bb68
......@@ -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();
......
......@@ -1295,7 +1295,7 @@ private:
}
}
builder.adoptAnnotations(translator.compileAnnotationApplications(
member->getSchema().adoptAnnotations(translator.compileAnnotationApplications(
member->declAnnotations, targetsFlagName));
}
......
......@@ -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);
......
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