gesamt: methodenaufrufe der art 'Term.ID(...)'
authorBernhard Urban <lewurm@gmail.com>
Sun, 6 Jun 2010 19:14:42 +0000 (21:14 +0200)
committerBernhard Urban <lewurm@gmail.com>
Sun, 6 Jun 2010 19:14:42 +0000 (21:14 +0200)
gesamt/parser.y

index 052e67faa178644c8da3d9724ea5699696259665..4722ff80cbda2ed00dce53f0704ec74f4a137dda 100644 (file)
@@ -556,7 +556,6 @@ Term:
 
        | IDENT '(' Exprs ')'
          @{
 
        | IDENT '(' Exprs ')'
          @{
-               /* TODO: soffset sollte eigentlich anzahl des paramcounts in Exprs + vars die existieren sein */
            @i {
                        @Term.node@ = new_call(@IDENT.name@, new_arg(new_nothing(), new_nothing(), 0) /*this*/,
                                        @Exprs.node@, @Term.gparamges@, @Term.vars_in@);
            @i {
                        @Term.node@ = new_call(@IDENT.name@, new_arg(new_nothing(), new_nothing(), 0) /*this*/,
                                        @Exprs.node@, @Term.gparamges@, @Term.vars_in@);
@@ -569,9 +568,14 @@ Term:
 
        | Term '.' IDENT '(' Exprs ')'
          @{
 
        | Term '.' IDENT '(' Exprs ')'
          @{
-           @i @Term.node@ = new_node(O_CALL, TREENULL, TREENULL);
+           @i {
+                       @Term.node@ = new_call(@IDENT.name@, new_arg(@Term.1.node@, new_nothing(), 0) /*this*/,
+                                       @Exprs.node@, @Term.gparamges@, @Term.vars_in@);
+                       @Term.node@->soffset = @Exprs.paramcount@;
+               }
                @i @Term.imm@ = 0;
                @i @Term.call@ = 1;
                @i @Term.imm@ = 0;
                @i @Term.call@ = 1;
+               @reg @Exprs.node@->reg = @Term.1.node@->reg = @Term.node@->kids[0]->reg = @Term.node@->reg;
          @}
 
        ;
          @}
 
        ;