[vala/switch-to-gir: 15/24] girparser: Support specifying symbols in metadata
- From: Luca Bruno <lucabru src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vala/switch-to-gir: 15/24] girparser: Support specifying symbols in metadata
- Date: Mon, 22 Nov 2010 20:54:54 +0000 (UTC)
commit 248bfbb698e2e9d723177a88d5defd17cc1e2dca
Author: Luca Bruno <lucabru src gnome org>
Date: Wed Nov 17 21:30:04 2010 +0100
girparser: Support specifying symbols in metadata
vala/valagirparser.vala | 16 +++++++++++++---
vapi/packages/gio-2.0/Gio-2.0.metadata | 4 ++++
2 files changed, 17 insertions(+), 3 deletions(-)
---
diff --git a/vala/valagirparser.vala b/vala/valagirparser.vala
index a80239a..8d848d0 100644
--- a/vala/valagirparser.vala
+++ b/vala/valagirparser.vala
@@ -400,7 +400,7 @@ public class Vala.GirParser : CodeVisitor {
return metadata;
}
- Expression? parse_literal () {
+ Expression? parse_expression () {
var src = get_current_src ();
Expression expr = null;
switch (current) {
@@ -422,8 +422,18 @@ public class Vala.GirParser : CodeVisitor {
case TokenType.STRING_LITERAL:
expr = new StringLiteral (get_string (), src);
break;
+ case TokenType.IDENTIFIER:
+ expr = new MemberAccess (null, get_string (), src);
+ while (next () == TokenType.DOT) {
+ if (next () != TokenType.IDENTIFIER) {
+ Report.error (get_current_src (), "expected identifier got `%s'".printf (current.to_string ()));
+ break;
+ }
+ expr = new MemberAccess (expr, get_string (), get_current_src ());
+ }
+ return expr;
default:
- Report.error (src, "expected literal");
+ Report.error (src, "expected literal or symbol got `%s'".printf (current.to_string ()));
break;
}
next ();
@@ -450,7 +460,7 @@ public class Vala.GirParser : CodeVisitor {
}
next ();
- Expression expr = parse_literal ();
+ Expression expr = parse_expression ();
if (expr == null) {
return false;
}
diff --git a/vapi/packages/gio-2.0/Gio-2.0.metadata b/vapi/packages/gio-2.0/Gio-2.0.metadata
index ebba460..a960578 100644
--- a/vapi/packages/gio-2.0/Gio-2.0.metadata
+++ b/vapi/packages/gio-2.0/Gio-2.0.metadata
@@ -2,6 +2,7 @@ Gio name="GLib"
content_type_* parent="GLib.ContentType" name="content_type_(.*)"
*.cancellable nullable default=null
*.*.cancellable nullable default=null
+BufferedInputStream.fill_async.io_priority default=GLib.Priority.DEFAULT
// Possible GI bugs
FileIOStream.seek.cancellable nullable
@@ -10,9 +11,12 @@ FileOutputStream.seek.cancellable nullable
// Re-check these
SimpleAsyncResult.new_take_error skip
+
+// Forward upstream
AppLaunchContext
.get_display.files type_arguments="File"
.get_startup_notify_id.files type_arguments="File"
+ApplicationCommandLine.get_platform_data nullable
/* OLD METADATA FOR REFERENCE
GLib cprefix="G" lower_case_cprefix="g_" cheader_filename="gio/gio.h" gir_namespace="Gio" gir_version="2.0"
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]