Skip to content

Commit

Permalink
sonar linting
Browse files Browse the repository at this point in the history
  • Loading branch information
b3b00 committed Nov 26, 2024
1 parent 7f526f8 commit e82fae8
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 16 deletions.
10 changes: 0 additions & 10 deletions src/sly/parser/parser/SyntaxParseResult.cs
Original file line number Diff line number Diff line change
Expand Up @@ -50,16 +50,6 @@ public void AddError(UnexpectedTokenSyntaxError<IN> error)

public List<LeadingToken<IN>> Expecting {get; set;}

public void AddExpecting(LeadingToken<IN> expected)
{

}

public void AddExpectings(IEnumerable<LeadingToken<IN>> expected)
{

}

public bool HasByPassNodes { get; set; } = false;
public bool UsesOperations { get; set; }
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,6 @@ public SyntaxParseResult<IN> ParseNonTerminal(IList<Token<IN>> tokens, string no
if (ruleResult.GetErrors() != null)
{
terr.AddRange(ruleResult.GetErrors());
result.AddExpectings(ruleResult.GetErrors().SelectMany(x => x.ExpectedTokens));
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,6 @@ public SyntaxParseResult<IN> ParseTerminal(IList<Token<IN>> tokens, TerminalClau
if (result.IsError)
{
result.AddError(new UnexpectedTokenSyntaxError<IN>(token, LexemeLabels, I18n, terminal.ExpectedToken));

result.AddExpecting(terminal.ExpectedToken);
}

parsingContext.Memoize(terminal, position, result);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ public virtual SyntaxParseResult<IN> ParseInfixExpressionRule(IList<Token<IN>> t
string nonTerminalName, SyntaxParsingContext<IN> parsingContext)
{
var currentPosition = position;
var isError = false;
var children = new List<ISyntaxNode<IN>>();
if (!tokens[position].IsEOS && rule.Match(tokens, position, Configuration) && rule.Clauses != null &&
rule.Clauses.Count > 0 && MatchExpressionRuleScheme(rule))
Expand Down Expand Up @@ -46,7 +45,6 @@ public virtual SyntaxParseResult<IN> ParseInfixExpressionRule(IList<Token<IN>> t
if (firstResult.Root is SyntaxNode<IN>)
{
firstResult.AddErrors(secondResult.GetErrors());
firstResult.AddExpectings(secondResult.Expecting);
return firstResult;
}
}
Expand All @@ -66,7 +64,6 @@ public virtual SyntaxParseResult<IN> ParseInfixExpressionRule(IList<Token<IN>> t
if (firstResult.Root is SyntaxNode<IN>)
{
firstResult.AddErrors(secondResult.GetErrors());
firstResult.AddExpectings(secondResult.Expecting);
return firstResult;
}
}
Expand Down

0 comments on commit e82fae8

Please sign in to comment.