Skip to content

Commit

Permalink
Bug fixed: parse regexp for unassigned int|float vars
Browse files Browse the repository at this point in the history
  • Loading branch information
corbanbrook committed Jan 28, 2010
1 parent 6ce93e8 commit b802a7a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion processing.js
Expand Up @@ -109,7 +109,7 @@
});

// int|float foo;
var intFloat = /(\n\s*(?:int|float)(?:\[\])?(?:\s*|[^\(]*?,\s*))([a-z]\w*)(;|,)/i;
var intFloat = /(\n\s*(?:int|float)(?!\[\])*(?:\s*|[^\(;]*?,\s*))(\w+)\s*(,|;)/i;
while( intFloat.test(aCode) ){
aCode = aCode.replace( new RegExp( intFloat ), function( all, type, name, sep ){
return type + " " + name + " = 0" + sep;
Expand Down

0 comments on commit b802a7a

Please sign in to comment.