From a407e331d0b2da7dd8c74657156a516923c9264f Mon Sep 17 00:00:00 2001 From: Jamie McCracken Date: Mon, 24 May 2010 14:00:49 -0400 Subject: Genie: Support non-null casts --- vala/valagenieparser.vala | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'vala') diff --git a/vala/valagenieparser.vala b/vala/valagenieparser.vala index 639759641..a02521b53 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; } -- cgit v1.2.1