Skip to content

Compiler errors become useless as soon as you have another PApplet #990

@processing-bugs

Description

@processing-bugs

Original author: [email protected] (December 31, 2011 06:50:51)

Once you have another PApplet defined, Any syntax error (e.g. a stray character or missing semicolon), gets reported as "unexpected void" on the setup. Meaning it becomes laborious to find even the simplest syntax error -- involving going through all the code commenting and uncommenting blocks until the error goes away. And doing this every time a new syntax error is introduced.

To see simply, first:

void setup()
{
int a=0;
}
void draw()
{
int b=0;
*

}

Note the '*' is there intentionally. When you run, you get a nice error showing just where the problem is. Now add a couple lines:

void setup()
{
int a=0;
}
void draw()
{
int b=0;
*
}

public class newApp extends PApplet {

}

Suddenly this error (and any other you might introduce) are all reported as unexpected void in setup.

Original issue: http://code.google.com/p/processing/issues/detail?id=952

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions