[vala] Genie: Support non-null casts
- From: Jamie McCracken <jamiemcc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vala] Genie: Support non-null casts
- Date: Mon, 24 May 2010 19:26:39 +0000 (UTC)
commit a407e331d0b2da7dd8c74657156a516923c9264f
Author: Jamie McCracken <jamie.mccrack gmail com>
Date: Mon May 24 14:00:49 2010 -0400
Genie: Support non-null casts
vala/valagenieparser.vala | 9 +++++++++
1 files changed, 9 insertions(+), 0 deletions(-)
---
diff --git a/vala/valagenieparser.vala b/vala/valagenieparser.vala
index 6397596..a02521b 100644
--- a/vala/valagenieparser.vala
+++ b/vala/valagenieparser.vala
@@ -1209,6 +1209,15 @@ public class Vala.Genie.Parser : CodeVisitor {
}
}
break;
+ case TokenType.OP_NEG:
+ next ();
+ if (accept (TokenType.CLOSE_PARENS)) {
+ // (!) non-null cast
+ var inner = parse_unary_expression ();
+ return new CastExpression.non_null (inner, get_src (begin));
+ }
+ break;
+
default:
break;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]