Skip to content

Commit

Permalink
Code cleanup before v3.0 final release (#402)
Browse files Browse the repository at this point in the history
* Align file names with contained type names

* dotnet format --severity warn

* Remove unnecessary usings
  • Loading branch information
adams85 authored Sep 3, 2023
1 parent 18f23ee commit 0d09a22
Show file tree
Hide file tree
Showing 16 changed files with 5 additions and 6 deletions.
4 changes: 2 additions & 2 deletions samples/Esprima.Benchmark/CharBenchmark.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ namespace Esprima.Benchmark;
[MemoryDiagnoser]
public class CharBenchmark
{
private static char[] _asciiRange;
private static char[] _fullRange;
private static readonly char[] _asciiRange;
private static readonly char[] _fullRange;

static CharBenchmark()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2099,7 +2099,7 @@ private Expression ParsePostfixUnaryExpression(Expression expr, in Marker marker
_context.IsAssignmentTarget = false;
_context.IsBindingElement = false;
var op = NextToken().Value;
expr = Finalize(marker, new UpdateExpression((string)op!, expr, prefix: false));
expr = Finalize(marker, new UpdateExpression((string) op!, expr, prefix: false));
return expr;
}

Expand All @@ -2117,7 +2117,7 @@ private Expression ParsePrefixUnaryExpression(in Marker marker)
TolerateError(Messages.InvalidLHSInAssignment);
}

expr = Finalize(marker, new UpdateExpression((string)token.Value!, expr, prefix: true));
expr = Finalize(marker, new UpdateExpression((string) token.Value!, expr, prefix: true));
_context.IsAssignmentTarget = false;
_context.IsBindingElement = false;
return expr;
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
1 change: 0 additions & 1 deletion src/Esprima/Utils/AstToJsonConverter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
using System.Numerics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Text.RegularExpressions;
using Esprima.Ast;

namespace Esprima.Utils;
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ public class StringMatcherGeneratorTests : SourceGeneratorTest
public Task ScannerStringMatchingGeneration()
{
return Verify<StringMatcherGenerator>(
LoadEsprimaSourceFile("JavascriptParser.cs"),
LoadEsprimaSourceFile("JavaScriptParser.cs"),
LoadEsprimaSourceFile("Scanner.cs"),
LoadEsprimaSourceFile("ParserExtensions.cs")
);
Expand Down

0 comments on commit 0d09a22

Please sign in to comment.