Bug 1466 : LITERAL_class handling in PdeEmitter
Last modified: 2010-02-19 05:22




Status:
RESOLVED
Resolution:
FIXED -
Priority:
P2
Severity:
normal

 

Reporter:
Christian Thiemann
Assigned To:
fry

Attachment Type Created Size Actions

Description:   Opened: 2010-02-18 14:03
Processing 1.0.9
Mac OS X 10.6.2
MacBookPro5,2 (2009 17")

The following sketch does not run/export:

Class a = PApplet.class;
void draw() {}

Rather, an error "Invalid type:70" is output.

Turns out this is because the LITERAL_class token (after "PApplet.") is ignored in the
print(AST) function of PdeEmitter. Inserting

case LITERAL_class:

into the long list of cases around line 670 of processing/app/preproc/PdeEmitter.java solves
the problem. At the bottom of that file is a list of other tokens which are believed to never
be produced by the syntax parser – maybe they should all go to the list at line 670 to get
passed through.
Additional Comment #1 From fry 2010-02-19 05:22
awesome, thanks so much for the help! now fixed for the next release.