diff --git a/app/src/processing/mode/java/preproc/PdePreprocessor.java b/app/src/processing/mode/java/preproc/PdePreprocessor.java index b356d5e8a..70b3abddf 100644 --- a/app/src/processing/mode/java/preproc/PdePreprocessor.java +++ b/app/src/processing/mode/java/preproc/PdePreprocessor.java @@ -249,21 +249,30 @@ public class PdePreprocessor { stringStart))); } } else if (program.charAt(i) == '\'') { - i++; + i++; // step over the initial quote if (i >= length) { - throw new SketchException("Unterminated character constant", 0, + throw new SketchException("Unterminated character constant (after initial quote)", 0, countNewlines(program.substring(0, i))); } if (program.charAt(i) == '\\') { - i++; + i++; // step over the backslash + } + if (i >= length) { + throw new SketchException("Unterminated character constant (after backslash)", 0, + countNewlines(program.substring(0, i))); + } + if (program.charAt(i) == 'u') { + i += 5; // step over the u, and the four digit unicode constant + } else { + i++; // step over a single character } - i++; if (i >= length) { throw new SketchException("Unterminated character constant", 0, countNewlines(program.substring(0, i))); } if (program.charAt(i) != '\'') { - throw new SketchException("Badly formed character constant", 0, + throw new SketchException("Badly formed character constant " + + "(expecting quote, got " + program.charAt(i) + ")", 0, countNewlines(program.substring(0, i))); } } diff --git a/core/todo.txt b/core/todo.txt index 65566fd4d..26ccf37d5 100644 --- a/core/todo.txt +++ b/core/todo.txt @@ -410,6 +410,8 @@ _ sort out destroy(), stop(), pause() et al _ ColorSelector should stop/pause when not visible _ start()/stop() perform like onPause()/onResume() _ all of which call pause() and resume() +_ problem with destroy() calling System.exit() +_ http://code.google.com/p/processing/issues/detail?id=698 _ decision on registered methods _ remove registerPre() et al _ add register("pause", ...) @@ -968,3 +970,5 @@ _ repeating texture support _ exactly how should pixel filling work with single pixel strokes? _ http://dev.processing.org/bugs/show_bug.cgi?id=1025 _ consider bringing back text/image using cache/names +_ exactly how pixel-filling works for strokes +_ http://processing.org/bugs/bugzilla/1025.html diff --git a/todo.txt b/todo.txt index a78ad7ac3..c6d24e9d7 100644 --- a/todo.txt +++ b/todo.txt @@ -5,6 +5,8 @@ X http://code.google.com/p/processing/issues/detail?id=634 X incorporate gsvideo and opengl2 as the default libraries for video and opengl X Launch script for Linux fails to open a sketches with relative paths X http://code.google.com/p/processing/issues/detail?id=707 +X Badly formed character constant exception +X http://code.google.com/p/processing/issues/detail?id=714 _ add deployJava.js to local sketch folder (causes internet requirement) _ http://code.google.com/p/processing/issues/detail?id=650 @@ -80,7 +82,8 @@ _ also happens with stray characters sometimes... _ casey: accidentally typing a letter at the top of the tab _ throws you onto the end of the last tab... exactly the worst location _ jer: omitting a semicolon shows the error on the line after it... -_ find across all tabs +_ find across all tabs (jer request) +_ http://code.google.com/p/processing/issues/detail?id=705 reference/examples _ import p5 reference into the javadoc @@ -998,7 +1001,7 @@ _ make the buildXxxx folders relate to time/date? low (common errors around reserved names/class naming) _ Saving sketch with the same name as a class or primitive breaks sketch -_ http://dev.processing.org/bugs/show_bug.cgi?id=1165 +_ http://code.google.com/p/processing/issues/detail?id=157 _ don't allow people to override methods like paint() _ make them final? just improve the error messages? _ http://dev.processing.org/bugs/show_bug.cgi?id=1219