diff options
author | Steven Knight <knight@baldmt.com> | 2004-12-03 19:30:28 (GMT) |
---|---|---|
committer | Steven Knight <knight@baldmt.com> | 2004-12-03 19:30:28 (GMT) |
commit | 52aaecf21cacdd3d1589d184ca5c26942bd6d2b1 (patch) | |
tree | 01f95c39526696363fcaddefebbebc8e18d57a16 /src/engine/SCons/Tool/JavaCommon.py | |
parent | f0c3476fdae7032e6232d112864518934ba8a13e (diff) | |
download | SCons-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.py | 7 |
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, |