@@ -25,7 +25,7 @@ public static Expression Parse(Simulation simulation, IEnumerator<Token> tokens,
2525 expression = new Value ( atPrefixed , getVariableValue ) ;
2626 break ;
2727 case DoubleAtPrefixedString doubleAtPrefixedString :
28- expression = new Value ( simulation , doubleAtPrefixedString ) ;
28+ expression = new Value ( doubleAtPrefixedString ) ;
2929 break ;
3030 case Name name :
3131 if ( name is UnquotedString && name . TryParse ( out var keyword ) )
@@ -34,14 +34,14 @@ public static Expression Parse(Simulation simulation, IEnumerator<Token> tokens,
3434 {
3535 case Keyword . As :
3636 if ( expression is null || ! tokens . TryMoveNext ( out token ) || token is not Name alias )
37- throw new SimulatedSqlException ( simulation , "Incorrect syntax near the keyword 'as'." , 156 , 15 , 1 ) ;
37+ throw new SimulatedSqlException ( "Incorrect syntax near the keyword 'as'." , 156 , 15 , 1 ) ;
3838
3939 expression = new NamedExpression ( expression , alias . Value ) ;
4040 _ = tokens . TryMoveNext ( out token ) ;
4141 return expression ;
4242 case Keyword . From :
4343 if ( expression is null )
44- throw new SimulatedSqlException ( simulation , "Incorrect syntax near the keyword 'from'." , 156 , 15 , 1 ) ;
44+ throw new SimulatedSqlException ( "Incorrect syntax near the keyword 'from'." , 156 , 15 , 1 ) ;
4545
4646 return expression ;
4747 }
@@ -53,7 +53,7 @@ public static Expression Parse(Simulation simulation, IEnumerator<Token> tokens,
5353 if ( expression is null )
5454 throw new NotSupportedException ( "Simulated expression parser doesn't know how to handle + at the start of an expression." ) ;
5555
56- token = tokens . RequireNext ( simulation ) ;
56+ token = tokens . RequireNext ( ) ;
5757
5858 expression = new Add ( expression , Parse ( simulation , tokens , ref token , getVariableValue ) ) ;
5959 break ;
@@ -64,11 +64,11 @@ public static Expression Parse(Simulation simulation, IEnumerator<Token> tokens,
6464 if ( expression is not Reference reference )
6565 throw new NotSupportedException ( "Simulated expression parser doesn't know how to handle '.' here." ) ;
6666
67- reference . AddMultiPartComponent ( tokens . RequireNext < Name > ( simulation ) ) ;
67+ reference . AddMultiPartComponent ( tokens . RequireNext < Name > ( ) ) ;
6868 break ;
6969 case Comma :
7070 if ( expression is null )
71- throw simulation . SyntaxErrorNear ( token ) ;
71+ throw SimulatedSqlException . SyntaxErrorNear ( token ) ;
7272 return expression ;
7373 default :
7474 throw new NotSupportedException ( $ "Simulated expression parser doesn't know how to handle '{ token } '.") ;
@@ -115,12 +115,12 @@ public Value(AtPrefixedString atPrefixed, Func<string, object?> getVariableValue
115115 this . value = getVariableValue ( atPrefixed . Value ) ;
116116 }
117117
118- public Value ( Simulation simulation , DoubleAtPrefixedString doubleAtPrefixedString )
118+ public Value ( DoubleAtPrefixedString doubleAtPrefixedString )
119119 {
120120 switch ( doubleAtPrefixedString . Parse ( ) )
121121 {
122122 case AtAtKeyword . Version :
123- this . value = simulation . Version ;
123+ this . value = "SQL Server Simulator" ;
124124 return ;
125125 }
126126
0 commit comments