Esempio n. 1
0
 public static Exception FunctionArgumentDuplicates(UserFunctionDefinitionSyntaxNode lexFunction, TypedVarDefSyntaxNode lexFunctionArg)
 => new FunParseException(554, $"'Argument name '{lexFunctionArg.Id}' duplicates at  {ErrorsHelper.Signature(lexFunction.Id, lexFunction.Args)} ", lexFunction.Head.Interval);
Esempio n. 2
0
 public static Exception FunExpressionIsMissed(string funName, List <TypedVarDefSyntaxNode> arguments, Interval interval)
 => new FunParseException(312,
                          $"{ErrorsHelper.Signature(funName, arguments)} = ??? . Function body is missed {Nl}Example: {ErrorsHelper.Signature(funName, arguments)} = #place your body here",
                          interval);
Esempio n. 3
0
 public static Exception FunctionAlreadyExist(UserFunctionDefinitionSyntaxNode userFun)
 => new FunParseException(545, $"Function  {ErrorsHelper.Signature(userFun.Id, userFun.Args)} already exist",
                          new Interval(userFun.Head.Interval.Start, userFun.Body.Interval.Finish));
Esempio n. 4
0
 public static Exception FunDefTokenIsMissed(string funName, List <TypedVarDefSyntaxNode> arguments, Tok actual)
 {
     return(new FunParseException(309, $"{ErrorsHelper.Signature(funName, arguments)} ??? . '=' def symbol is skipped but was {ErrorsHelper.ToText(actual)}{Nl}Example: {ErrorsHelper.Signature(funName, arguments)} = ...",
                                  actual.Start, actual.Finish));
 }