summaryrefslogtreecommitdiff
path: root/tests/scanner/Regress-1.0-Gjs-expected
diff options
context:
space:
mode:
authorMathieu Duponchelle <mathieu@centricular.com>2020-07-01 23:34:34 +0200
committerMathieu Duponchelle <mathieu@centricular.com>2020-07-12 02:52:12 +0200
commitd7504419093aef9fae802ad599cff1bf9022e24d (patch)
treeba9b0aa6815f98ae44106388134d9e822b2327a1 /tests/scanner/Regress-1.0-Gjs-expected
parentbc8d3bc249e8eeff444e5fafac0d8821244fdb26 (diff)
downloadgobject-introspection-d7504419093aef9fae802ad599cff1bf9022e24d.tar.gz
giscanner: parse block comments for members and fields
There was previously no mechanism for tagging enum members and struct fields with Since tags (or other, eg deprecation tags). While the customary place to add Since tags for these symbols is inline in the parent symbol's documentation eg: /** * Foo: * * @FOO_BAR: some bar. Since X.Y */ And variations on that theme, implementing parsing for that scheme would result in a pretty ambiguous grammar, especially if we also want support for multiple tags. Instead, the solution implemented here is to allow providing documentation for individual members and fields through their own separate block, as is done for virtual functions already. Inline comments are still used, with a lower precedence. Fixes #348
Diffstat (limited to 'tests/scanner/Regress-1.0-Gjs-expected')
-rw-r--r--tests/scanner/Regress-1.0-Gjs-expected/Regress.AnnotationBitfield.page4
-rw-r--r--tests/scanner/Regress-1.0-Gjs-expected/Regress.AnnotationFields-field4.page18
-rw-r--r--tests/scanner/Regress-1.0-Gjs-expected/Regress.AnnotationFields.page1
3 files changed, 23 insertions, 0 deletions
diff --git a/tests/scanner/Regress-1.0-Gjs-expected/Regress.AnnotationBitfield.page b/tests/scanner/Regress-1.0-Gjs-expected/Regress.AnnotationBitfield.page
index 355066b2..6f96ddb2 100644
--- a/tests/scanner/Regress-1.0-Gjs-expected/Regress.AnnotationBitfield.page
+++ b/tests/scanner/Regress-1.0-Gjs-expected/Regress.AnnotationBitfield.page
@@ -20,6 +20,10 @@
<title><code>AnnotationBitfield.BAR</code></title>
</item>
+<item>
+<title><code>AnnotationBitfield.FOOBAR</code></title>
+
+</item>
</terms>
<links type="topic" ui:expanded="true"
api:type="function" api:mime="text/x-gjs"
diff --git a/tests/scanner/Regress-1.0-Gjs-expected/Regress.AnnotationFields-field4.page b/tests/scanner/Regress-1.0-Gjs-expected/Regress.AnnotationFields-field4.page
new file mode 100644
index 00000000..e60c59bc
--- /dev/null
+++ b/tests/scanner/Regress-1.0-Gjs-expected/Regress.AnnotationFields-field4.page
@@ -0,0 +1,18 @@
+<?xml version="1.0"?>
+<page id="Regress.AnnotationFields-field4"
+ type="topic"
+ style="field"
+ xmlns="http://projectmallard.org/1.0/"
+ xmlns:api="http://projectmallard.org/experimental/api/"
+ xmlns:ui="http://projectmallard.org/1.0/ui/">
+ <info>
+ <link xref="Regress.AnnotationFields" group="field" type="guide"/>
+ <title type="link" role="topic">field4</title>
+ </info>
+ <title>Regress.AnnotationFields.field4</title>
+ <synopsis><code mime="text/x-gjs">
+AnnotationFields.field4: Number(guint) (Read / Write)
+ </code></synopsis>
+ <p>A new field, breaking ABI is fun!</p>
+ <p>Since 1.4</p>
+</page>
diff --git a/tests/scanner/Regress-1.0-Gjs-expected/Regress.AnnotationFields.page b/tests/scanner/Regress-1.0-Gjs-expected/Regress.AnnotationFields.page
index 585a97c1..7cd55257 100644
--- a/tests/scanner/Regress-1.0-Gjs-expected/Regress.AnnotationFields.page
+++ b/tests/scanner/Regress-1.0-Gjs-expected/Regress.AnnotationFields.page
@@ -16,6 +16,7 @@ let annotationFields = new Regress.AnnotationFields({
<link xref='Regress.AnnotationFields-field1'>field1</link>: value
<link xref='Regress.AnnotationFields-arr'>arr</link>: value
<link xref='Regress.AnnotationFields-len'>len</link>: value
+ <link xref='Regress.AnnotationFields-field4'>field4</link>: value
});
</code></synopsis>
<p>This is a struct for testing field documentation and annotations</p>