summaryrefslogtreecommitdiffstats
path: root/src/engine/SCons/Tool/JavaCommon.py
diff options
context:
space:
mode:
authorSteven Knight <knight@baldmt.com>2004-12-03 19:30:28 (GMT)
committerSteven Knight <knight@baldmt.com>2004-12-03 19:30:28 (GMT)
commit52aaecf21cacdd3d1589d184ca5c26942bd6d2b1 (patch)
tree01f95c39526696363fcaddefebbebc8e18d57a16 /src/engine/SCons/Tool/JavaCommon.py
parentf0c3476fdae7032e6232d112864518934ba8a13e (diff)
downloadSCons-52aaecf21cacdd3d1589d184ca5c26942bd6d2b1.zip
SCons-52aaecf21cacdd3d1589d184ca5c26942bd6d2b1.tar.gz
SCons-52aaecf21cacdd3d1589d184ca5c26942bd6d2b1.tar.bz2
Fix Java parsing when creating an array of class instances.
Diffstat (limited to 'src/engine/SCons/Tool/JavaCommon.py')
-rw-r--r--src/engine/SCons/Tool/JavaCommon.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/engine/SCons/Tool/JavaCommon.py b/src/engine/SCons/Tool/JavaCommon.py
index 72196e3..5c46288 100644
--- a/src/engine/SCons/Tool/JavaCommon.py
+++ b/src/engine/SCons/Tool/JavaCommon.py
@@ -45,10 +45,11 @@ if java_parsing:
# A regular expression that will find, in a java file: newlines;
# any alphanumeric token (keyword, class name, specifier); open or
# close brackets; a single-line comment "//"; the multi-line comment
- # begin and end tokens /* and */; single or double quotes; and
- # single or double quotes preceeded by a backslash.
+ # begin and end tokens /* and */; single or double quotes;
+ # single or double quotes preceeded by a backslash; array
+ # declarations "[]".
_reToken = re.compile(r'(\n|//|\\[\'"]|[\'"\{\}]|[A-Za-z_][\w\.]*|' +
- r'/\*|\*/)')
+ r'/\*|\*/|\[\])')
class OuterState:
"""The initial state for parsing a Java file for classes,