Browse Source

Fixed try catch statement position + failing test.

newNRvisualizers
Mike Krüger 13 years ago
parent
commit
755e37edaa
  1. 2
      ICSharpCode.NRefactory.CSharp/Parser/mcs/cs-parser.cs
  2. 2
      ICSharpCode.NRefactory.CSharp/Parser/mcs/cs-parser.jay
  3. 2
      ICSharpCode.NRefactory.CSharp/Parser/mcs/cs-tokenizer.cs
  4. 6
      ICSharpCode.NRefactory.CSharp/Parser/mcs/statement.cs

2
ICSharpCode.NRefactory.CSharp/Parser/mcs/cs-parser.cs

@ -9056,7 +9056,7 @@ void case_903() @@ -9056,7 +9056,7 @@ void case_903()
void case_904()
#line 6041 "cs-parser.jay"
{
yyVal = new TryFinally (new TryCatch ((Block) yyVals[-3+yyTop], (List<Catch>) yyVals[-2+yyTop], Location.Null, true), (Block) yyVals[0+yyTop], GetLocation (yyVals[-4+yyTop]));
yyVal = new TryFinally (new TryCatch ((Block) yyVals[-3+yyTop], (List<Catch>) yyVals[-2+yyTop], GetLocation (yyVals[-4+yyTop]), true), (Block) yyVals[0+yyTop], GetLocation (yyVals[-4+yyTop]));
lbag.AddStatement (yyVal, GetLocation (yyVals[-1+yyTop]));
}

2
ICSharpCode.NRefactory.CSharp/Parser/mcs/cs-parser.jay

@ -6039,7 +6039,7 @@ try_statement @@ -6039,7 +6039,7 @@ try_statement
}
| TRY block catch_clauses FINALLY block
{
$$ = new TryFinally (new TryCatch ((Block) $2, (List<Catch>) $3, Location.Null, true), (Block) $5, GetLocation ($1));
$$ = new TryFinally (new TryCatch ((Block) $2, (List<Catch>) $3, GetLocation ($1), true), (Block) $5, GetLocation ($1));
lbag.AddStatement ($$, GetLocation ($4));
}
| TRY block error

2
ICSharpCode.NRefactory.CSharp/Parser/mcs/cs-tokenizer.cs

@ -1572,7 +1572,7 @@ namespace Mono.CSharp @@ -1572,7 +1572,7 @@ namespace Mono.CSharp
#endif
number_pos = 0;
var loc = Location;
// bool hasLeadingDot = c == '.';
bool hasLeadingDot = c == '.';
if (c >= '0' && c <= '9'){
if (c == '0'){

6
ICSharpCode.NRefactory.CSharp/Parser/mcs/statement.cs

@ -2076,8 +2076,8 @@ namespace Mono.CSharp { @@ -2076,8 +2076,8 @@ namespace Mono.CSharp {
static int id;
public int ID = id++;
// static int clone_id_counter;
// int clone_id;
static int clone_id_counter;
int clone_id;
#endif
// int assignable_slots;
@ -2396,7 +2396,7 @@ namespace Mono.CSharp { @@ -2396,7 +2396,7 @@ namespace Mono.CSharp {
{
Block target = (Block) t;
#if DEBUG
// target.clone_id = clone_id_counter++;
target.clone_id = clone_id_counter++;
#endif
clonectx.AddBlockMap (this, target);

Loading…
Cancel
Save