[vala/switch-to-gir] girparser: Allow argument-less metadata
- From: Luca Bruno <lucabru src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vala/switch-to-gir] girparser: Allow argument-less metadata
- Date: Wed, 25 Aug 2010 11:28:58 +0000 (UTC)
commit 7478d051359e717ee101d5f0f929a44fa0b7b6cf
Author: Luca Bruno <lethalman88 gmail com>
Date: Wed Aug 25 13:28:20 2010 +0200
girparser: Allow argument-less metadata
vala/valagirparser.vala | 12 ++++++------
1 files changed, 6 insertions(+), 6 deletions(-)
---
diff --git a/vala/valagirparser.vala b/vala/valagirparser.vala
index 3e5aeea..576e53e 100644
--- a/vala/valagirparser.vala
+++ b/vala/valagirparser.vala
@@ -347,8 +347,8 @@ public class Vala.GirParser : CodeVisitor {
while (true) {
var old_end = end;
next ();
- if (old_end.pos != begin.pos) {
- // spaces in the middle
+ if (current == TokenType.EOF || old_end.pos != begin.pos) {
+ // eof or spaces in the middle
break;
}
@@ -445,8 +445,8 @@ public class Vala.GirParser : CodeVisitor {
}
do {
- if (begin.line != old_end.line) {
- // new line, new rule
+ if (current == TokenType.EOF || begin.line != old_end.line) {
+ // eof or new line
break;
}
@@ -481,8 +481,8 @@ public class Vala.GirParser : CodeVisitor {
return false;
}
- if (old_end.line != end.line) {
- // new line, new rule
+ if (current == TokenType.EOF || old_end.line != end.line) {
+ // eof or new rule
return true;
}
return parse_args (metadata);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]