Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Various improvements #331

Merged
merged 12 commits into from
Dec 13, 2024
Merged

Various improvements #331

merged 12 commits into from
Dec 13, 2024

Conversation

teo-tsirpanis
Copy link
Owner

No description provided.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot reviewed 9 out of 24 changed files in this pull request and generated no suggestions.

Files not reviewed (15)
  • src/FarkleNeo/Farkle.fs: Language not supported
  • src/FarkleNeo/Grammars/GoldParser/GoldGrammarConverter.cs: Evaluated as low risk
  • src/FarkleNeo/Builder/Untyped.cs: Evaluated as low risk
  • src/FarkleNeo/Builder/OperatorPrecedence/OperatorScope.cs: Evaluated as low risk
  • src/FarkleNeo/Grammars/EntityHandle.cs: Evaluated as low risk
  • src/FarkleNeo/Builder/Dfa/DfaBuild.cs: Evaluated as low risk
  • src/FarkleNeo/Grammars/StateMachines/Dfa.cs: Evaluated as low risk
  • src/FarkleNeo/DebuggerTypeProxies.cs: Evaluated as low risk
  • src/FarkleNeo/Grammars/StateMachines/DfaEdge.cs: Evaluated as low risk
  • src/FarkleNeo/Grammars/Writers/GrammarWriter.cs: Evaluated as low risk
  • sample/Farkle.Samples.CSharp/JSON.cs: Evaluated as low risk
  • src/FarkleNeo/Grammars/GrammarExtensions.cs: Evaluated as low risk
  • src/FarkleNeo/Grammars/GoldParser/GrammarBinaryReader.cs: Evaluated as low risk
  • src/FarkleNeo/Grammars/Grammar.cs: Evaluated as low risk
  • src/FarkleNeo/Builder/ObjectModel.cs: Evaluated as low risk
Comments skipped due to low confidence (5)

src/FarkleNeo/Grammars/Production.cs:82

  • The phrase 'the the' should be corrected to 'the'.
/// Returns a string describing the the <see cref="Production"/>.

src/FarkleNeo/Grammars/Nonterminal.cs:87

  • The word 'the' is repeated. It should be 'Returns a string describing the '
/// Returns a string describing the the <see cref="Nonterminal"/>.

src/FarkleNeo/Grammars/Nonterminal.cs:79

  • The Equals method should be covered by tests to ensure it behaves correctly.
public bool Equals(Nonterminal other) => _grammar == other._grammar && Handle == other.Handle;

src/FarkleNeo/Grammars/TokenSymbol.cs:92

  • The comment contains a double 'the'. It should be corrected to 'Returns a string describing the .'
/// Returns a string describing the the <see cref="TokenSymbol"/>.

src/FarkleNeo/Grammars/Group.cs:121

  • The comment contains a spelling mistake: 'describing the the' should be 'describing the'.
/// Returns a string describing the the <see cref="Group"/>.
The original plan was to do it only for handles, but since we almost everywhere use concrete objects, they should support equality as well.
It can be done with one line since .NET 9 and with a few more lines in earlier frameworks.
This allows us to accept params immutable array when setting typed productions.
It no longer depends on the result type at all, and the APIs that don't even depend on the character type are moved to a non-generic class.
We use `Load` instead of `Create` and `Convert` for GOLD Parser grammar conversions.
The read-only span overload was removed because it always had to copy the span if the grammar is valid. Better make memory management explicit to the user.
Also added an API to convert a GOLD Parser grammar from a file.
Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
69.9% Coverage on New Code (required ≥ 80%)

See analysis details on SonarQube Cloud

@teo-tsirpanis teo-tsirpanis merged commit a4e952d into mainstream Dec 13, 2024
4 of 5 checks passed
@teo-tsirpanis teo-tsirpanis deleted the various-improvements branch December 13, 2024 03:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant