mirror of
https://github.com/processing/processing4.git
synced 2026-02-14 10:55:38 +01:00
minor cleanups, some notes, see if better option for issue #1312
This commit is contained in:
@@ -59,8 +59,8 @@ public class Compiler {
|
||||
String baseCommand[] = new String[] {
|
||||
"-Xemacs",
|
||||
//"-noExit", // not necessary for ecj
|
||||
"-source", "1.5",
|
||||
"-target", "1.5",
|
||||
"-source", "1.6",
|
||||
"-target", "1.6",
|
||||
"-classpath", build.getClassPath(),
|
||||
"-nowarn", // we're not currently interested in warnings (works in ecj)
|
||||
"-d", build.getBinFolder().getAbsolutePath() // output the classes in the buildPath
|
||||
|
||||
@@ -275,6 +275,7 @@ public class JavaBuild {
|
||||
fnfe.printStackTrace();
|
||||
String msg = "Build folder disappeared or could not be written";
|
||||
throw new SketchException(msg);
|
||||
|
||||
} catch (antlr.RecognitionException re) {
|
||||
// re also returns a column that we're not bothering with for now
|
||||
// first assume that it's the main file
|
||||
@@ -293,7 +294,7 @@ public class JavaBuild {
|
||||
String msg = re.getMessage();
|
||||
|
||||
//System.out.println(java.getAbsolutePath());
|
||||
System.out.println(bigCode);
|
||||
// System.out.println(bigCode);
|
||||
|
||||
if (msg.contains("expecting RCURLY")) {
|
||||
//if (msg.equals("expecting RCURLY, found 'null'")) {
|
||||
|
||||
@@ -169,6 +169,20 @@ public class PdePreprocessor {
|
||||
"(?:^|\\s|;)size\\s*\\(\\s*([^\\s,]+)\\s*,\\s*([^\\s,\\)]+),?\\s*([^\\)]*)\\s*\\)\\s*\\;";
|
||||
//"(?:^|\\s|;)size\\s*\\(\\s*(\\S+)\\s*,\\s*([^\\s,\\)]+),?\\s*([^\\)]*)\\s*\\)\\s*\\;";
|
||||
|
||||
|
||||
private static final Pattern PUBLIC_CLASS =
|
||||
Pattern.compile("(^|;)\\s*public\\s+class\\s+\\S+\\s+extends\\s+PApplet", Pattern.MULTILINE);
|
||||
// Can't only match any 'public class', needs to be a PApplet
|
||||
// http://code.google.com/p/processing/issues/detail?id=551
|
||||
//Pattern.compile("(^|;)\\s*public\\s+class", Pattern.MULTILINE);
|
||||
|
||||
|
||||
private static final Pattern FUNCTION_DECL =
|
||||
Pattern.compile("(^|;)\\s*((public|private|protected|final|static)\\s+)*" +
|
||||
"(void|int|float|double|String|char|byte)" +
|
||||
"(\\s*\\[\\s*\\])?\\s+[a-zA-Z0-9]+\\s*\\(",
|
||||
Pattern.MULTILINE);
|
||||
|
||||
|
||||
public PdePreprocessor(final String sketchName) {
|
||||
this(sketchName, Preferences.getInteger("editor.tabs.size"));
|
||||
@@ -340,7 +354,7 @@ public class PdePreprocessor {
|
||||
|
||||
|
||||
public void setMode(final Mode mode) {
|
||||
// System.err.println("Setting mode to " + mode);
|
||||
//System.err.println("Setting mode to " + mode);
|
||||
this.mode = mode;
|
||||
}
|
||||
|
||||
@@ -565,17 +579,6 @@ public class PdePreprocessor {
|
||||
return new String(p2, 0, index);
|
||||
}
|
||||
|
||||
private static final Pattern PUBLIC_CLASS =
|
||||
Pattern.compile("(^|;)\\s*public\\s+class\\s+\\S+\\s+extends\\s+PApplet", Pattern.MULTILINE);
|
||||
// Can't only match any 'public class', needs to be a PApplet
|
||||
// http://code.google.com/p/processing/issues/detail?id=551
|
||||
//Pattern.compile("(^|;)\\s*public\\s+class", Pattern.MULTILINE);
|
||||
|
||||
private static final Pattern FUNCTION_DECL =
|
||||
Pattern.compile("(^|;)\\s*((public|private|protected|final|static)\\s+)*" +
|
||||
"(void|int|float|double|String|char|byte)" +
|
||||
"(\\s*\\[\\s*\\])?\\s+[a-zA-Z0-9]+\\s*\\(",
|
||||
Pattern.MULTILINE);
|
||||
|
||||
/**
|
||||
* preprocesses a pde file and writes out a java file
|
||||
|
||||
17
todo.txt
17
todo.txt
@@ -2,15 +2,13 @@
|
||||
M implement find & replace over multiple tabs
|
||||
M http://code.google.com/p/processing/issues/detail?id=25
|
||||
M added to the projects list
|
||||
|
||||
X change all build.xml files to use Java 6 as both source and target
|
||||
X (avoids Java 7 warnings during build)
|
||||
A calling jump() resets movie speed
|
||||
A http://code.google.com/p/processing/issues/detail?id=1303
|
||||
|
||||
_ problems running on OS X with recent updates
|
||||
_ also that missing semicolon on first line just produces "null" as the error
|
||||
_ http://code.google.com/p/processing/issues/detail?id=1312
|
||||
_ seems that 1.7 is now the default, and no 32-bit option is available (!@#$)
|
||||
_ but the 32-bit JVM for 1.6 seems to still be installed
|
||||
X problems running on OS X with recent updates
|
||||
X seems that 1.7 is now the default, and no 32-bit option is available (!@#$)
|
||||
X but the 32-bit JVM for 1.6 seems to still be installed
|
||||
|
||||
. . .
|
||||
|
||||
@@ -533,6 +531,7 @@ low (features)
|
||||
_ copy running code from /tmp/buildXXxxx on crash of p5
|
||||
_ should probably make a way to save/recover code
|
||||
_ make the buildXxxx folders relate to time/date?
|
||||
_ link out to further documentation (e.g. AIOOBE, NPE)
|
||||
|
||||
low (common errors around reserved names/class naming)
|
||||
_ Saving sketch with the same name as a class or primitive breaks sketch
|
||||
@@ -550,8 +549,8 @@ _ using a keyword as a variable name gives unhelpful error message
|
||||
_ http://code.google.com/p/processing/issues/detail?id=54
|
||||
|
||||
low (better error messages)
|
||||
_ need better error messages in general
|
||||
_ some means to link out to further documentation (e.g. AIOOBE, NPE)
|
||||
_ single line of code with no semicolon dies with "unexpected token: null"
|
||||
_ http://code.google.com/p/processing/issues/detail?id=1312
|
||||
_ if 'void' left out before loop or setup, cryptic message about
|
||||
_ 'constructor loop must be named Temporary_23498_2343'
|
||||
_ add a better handler for this specific thing?
|
||||
|
||||
Reference in New Issue
Block a user