[vala] Genie: Fix parameter attributes (patch by Arc Riley)
- From: Jamie McCracken <jamiemcc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vala] Genie: Fix parameter attributes (patch by Arc Riley)
- Date: Sun, 27 Feb 2011 23:49:36 +0000 (UTC)
commit 9e5b88df1c543746a540982e935609a7d4a829fa
Author: Jamie McCracken <jamie mccrack gmail com>
Date: Sun Feb 27 18:49:03 2011 -0500
Genie: Fix parameter attributes (patch by Arc Riley)
vala/valagenieparser.vala | 16 ++++++++--------
1 files changed, 8 insertions(+), 8 deletions(-)
---
diff --git a/vala/valagenieparser.vala b/vala/valagenieparser.vala
index 41c66b6..89e5ea7 100644
--- a/vala/valagenieparser.vala
+++ b/vala/valagenieparser.vala
@@ -2287,7 +2287,7 @@ public class Vala.Genie.Parser : CodeVisitor {
}
}
- List<Attribute>? parse_attributes () throws ParseError {
+ List<Attribute>? parse_attributes (bool parameter) throws ParseError {
if (current () != TokenType.OPEN_BRACKET) {
return null;
}
@@ -2311,8 +2311,8 @@ public class Vala.Genie.Parser : CodeVisitor {
} while (accept (TokenType.COMMA));
expect (TokenType.CLOSE_BRACKET);
}
- expect (TokenType.EOL);
-
+ if (!parameter)
+ expect (TokenType.EOL);
return attrs;
}
@@ -2326,7 +2326,7 @@ public class Vala.Genie.Parser : CodeVisitor {
Symbol parse_declaration (bool is_root = false) throws ParseError {
comment = scanner.pop_comment ();
- var attrs = parse_attributes ();
+ var attrs = parse_attributes (false);
var begin = get_location ();
switch (current ()) {
@@ -3049,7 +3049,7 @@ public class Vala.Genie.Parser : CodeVisitor {
expect (TokenType.INDENT);
while (current () != TokenType.DEDENT) {
var accessor_begin = get_location ();
- var attribs = parse_attributes ();
+ var attribs = parse_attributes (false);
var value_type = type.copy ();
value_type.value_owned = accept (TokenType.OWNED);
@@ -3376,7 +3376,7 @@ public class Vala.Genie.Parser : CodeVisitor {
// allow trailing comma
break;
}
- var value_attrs = parse_attributes ();
+ var value_attrs = parse_attributes (false);
var value_begin = get_location ();
string id = parse_identifier ();
comment = scanner.pop_comment ();
@@ -3433,7 +3433,7 @@ public class Vala.Genie.Parser : CodeVisitor {
// allow trailing comma
break;
}
- var code_attrs = parse_attributes ();
+ var code_attrs = parse_attributes (false);
var code_begin = get_location ();
string id = parse_identifier ();
comment = scanner.pop_comment ();
@@ -3545,7 +3545,7 @@ public class Vala.Genie.Parser : CodeVisitor {
}
Parameter parse_parameter () throws ParseError {
- var attrs = parse_attributes ();
+ var attrs = parse_attributes (true);
var begin = get_location ();
if (accept (TokenType.ELLIPSIS)) {
// varargs
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]