|
|
@ -51,11 +51,9 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax |
|
|
|
public static readonly object AnyValue = new object(); |
|
|
|
public static readonly object AnyValue = new object(); |
|
|
|
|
|
|
|
|
|
|
|
TextLocation startLocation; |
|
|
|
TextLocation startLocation; |
|
|
|
public override TextLocation StartLocation { |
|
|
|
TextLocation endLocation; |
|
|
|
get { |
|
|
|
public override TextLocation StartLocation => startLocation; |
|
|
|
return startLocation; |
|
|
|
public override TextLocation EndLocation => endLocation; |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
internal void SetLocation(TextLocation startLocation, TextLocation endLocation) |
|
|
|
internal void SetLocation(TextLocation startLocation, TextLocation endLocation) |
|
|
|
{ |
|
|
|
{ |
|
|
@ -64,18 +62,6 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax |
|
|
|
this.endLocation = endLocation; |
|
|
|
this.endLocation = endLocation; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
string literalValue; |
|
|
|
|
|
|
|
TextLocation? endLocation; |
|
|
|
|
|
|
|
public override TextLocation EndLocation { |
|
|
|
|
|
|
|
get { |
|
|
|
|
|
|
|
if (!endLocation.HasValue) { |
|
|
|
|
|
|
|
endLocation = value is string ? AdvanceLocation (StartLocation, literalValue ?? "") : |
|
|
|
|
|
|
|
new TextLocation (StartLocation.Line, StartLocation.Column + (literalValue ?? "").Length); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
return endLocation.Value; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
object value; |
|
|
|
object value; |
|
|
|
LiteralFormat format; |
|
|
|
LiteralFormat format; |
|
|
|
|
|
|
|
|
|
|
@ -87,14 +73,6 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public void SetValue(object value, string literalValue) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
if (value == null) |
|
|
|
|
|
|
|
throw new ArgumentNullException(); |
|
|
|
|
|
|
|
ThrowIfFrozen(); |
|
|
|
|
|
|
|
this.value = value; |
|
|
|
|
|
|
|
this.literalValue = literalValue; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public LiteralFormat Format { |
|
|
|
public LiteralFormat Format { |
|
|
|
get { return format;} |
|
|
|
get { return format;} |
|
|
|