~ubuntu-branches/ubuntu/vivid/vala/vivid

« back to all changes in this revision

Viewing changes to vala/valagenieparser.vala

  • Committer: Bazaar Package Importer
  • Author(s): Sebastian Dröge
  • Date: 2010-07-28 07:58:01 UTC
  • mfrom: (1.5.5 upstream) (7.3.14 experimental)
  • Revision ID: james.westby@ubuntu.com-20100728075801-18u9cg5hv5oety6m
Tags: 0.9.4-1
New upstream development release.

Show diffs side-by-side

added added

removed removed

Lines of Context:
3041
3041
                }
3042
3042
 
3043
3043
                if (accept (TokenType.ASSIGN)) {
3044
 
                        prop.default_expression = parse_expression ();
 
3044
                        prop.initializer = parse_expression ();
3045
3045
                }
3046
3046
 
3047
3047
 
3123
3123
 
3124
3124
                        if (needs_var) {
3125
3125
                                /* automatic property accessor body generation */
3126
 
                                var field_type = prop.property_type.copy ();
3127
 
                                prop.field = new Field ("_%s".printf (prop.name), field_type, prop.default_expression, prop.source_reference);
 
3126
                                var variable_type = prop.property_type.copy ();
 
3127
                                prop.field = new Field ("_%s".printf (prop.name), variable_type, prop.initializer, prop.source_reference);
3128
3128
                                prop.field.access = SymbolAccessibility.PRIVATE;
3129
3129
                                prop.field.binding = prop.binding;
3130
3130
                        }
3382
3382
                        var value_begin = get_location (); 
3383
3383
                        string id = parse_identifier ();
3384
3384
                        comment = scanner.pop_comment ();
3385
 
                        var ev = new EnumValue (id, get_src (value_begin), comment);
 
3385
 
 
3386
                        Expression value = null;
 
3387
                        if (accept (TokenType.ASSIGN)) {
 
3388
                                value = parse_expression ();
 
3389
                        }
 
3390
 
 
3391
                        var ev = new EnumValue (id, value, get_src (value_begin), comment);
3386
3392
                        set_attributes (ev, value_attrs);
3387
 
                        
3388
 
                        if (accept (TokenType.ASSIGN)) {
3389
 
                                ev.value = parse_expression ();
3390
 
                        }
 
3393
 
3391
3394
                        en.add_value (ev);
3392
3395
                        expect (TokenType.EOL);
3393
3396
                } while (true);
3575
3578
                param.direction = direction;
3576
3579
                param.params_array = params_array;
3577
3580
                if (accept (TokenType.ASSIGN)) {
3578
 
                        param.default_expression = parse_expression ();
 
3581
                        param.initializer = parse_expression ();
3579
3582
                }
3580
3583
                return param;
3581
3584
        }