Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [pdt-dev] [PHP7] Anonymous Classes

You were faster :P

I think about second option, similar to LambdaFunctionDeclaration.
But, AnonymousClassInstance is really required? className is an _expression_ in both ast's so could be AnonymousClassDeclaration also. 

JDT have annonymousClassDeclaration property for ClassInstanceCreation..

-- 
Dawid Pakuła
+48 795 996 064

On 27 Jul 2015 at 13:24:53, Michał Niewrzał (michal.n@xxxxxxxx) wrote:

Ok, I think I resolved my problem. Reorganized anonymous_class rule + fixed conflicts and works ok for now :) 

Now I have different question. I'm not sure what approach would be better:
* extend ClassInstanceCreation and ClassDeclaration (similar to previous php7 patches)
* create something like AnonymousClassDeclaration/AnonymousClassInstance that will hold all info about anonymous class declaration
* third option?

Michal

On Sun, Jul 26, 2015 at 11:52 PM, Michał Niewrzał <michal.n@xxxxxxxx> wrote:
Dawid, thanks for hint about conflicts. I noticed them but I didn't noticed that I have more than for PHP5.6:) Unfortunately after I removed 3 new conflicts situation is the same. I will keep looking :)

On Sun, Jul 26, 2015 at 11:05 PM, Dawid Pakuła <zulus@xxxxxxxxx> wrote:
Java cup (and also java cup eclipse editor), reports 3 additional Shift-Reduce conflict in compare to php < 7 parsers.

Java Cup editor is available under http://www2.in.tum.de/projects/cup/eclipse
Note Java 1.8 is required ;)

-- 
Dawid Pakuła
+48 795 996 064

On 26 Jul 2015 at 22:59:00, Michał Niewrzał (michal.n@xxxxxxxx) wrote:

Hi,

I'm working with with support for anonymous classes but I stuck with defining rules for compiler parser. I used rules from php7 parser and for DOM parser everything looks to work ok, but for compiler parser works ok for definition like this:

new class($tset) extends Date implements AAA{
}

but when I'm adding content to class definition then something is not matched. I tried to found out what is wrong but without success. Maybe someone will have idea how to handle this. I prepared very basic patch to show where I started:

Any help or suggestions would be most welcome:)

Thanks,
Michal
_______________________________________________
pdt-dev mailing list
pdt-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/pdt-dev

_______________________________________________
pdt-dev mailing list
pdt-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/pdt-dev


_______________________________________________
pdt-dev mailing list
pdt-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/pdt-dev

Back to the top