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

Feature/lexer issue 58 #67

Merged
merged 4 commits into from
Jul 25, 2024
Merged

Feature/lexer issue 58 #67

merged 4 commits into from
Jul 25, 2024

Conversation

Stepami
Copy link
Owner

@Stepami Stepami commented Jul 25, 2024

Description

Алгоритм пришлось поменять на такой:

LinkedList<int> indices = [];
while (true)
{
    var start = indices.Last != null ? indices.Last.Value + 1 : 0;
    if (start == textLength)
        break;
    var textAsSpan = newText.AsSpan(
        start,
        length: textLength - start);
    var index = textAsSpan.IndexOfAny(_sv);
    indices.AddLast(start + index);
}

Related Issues

Closes #58

References

Checklist:

  • I have followed the contribution guidelines and code style for this project.
  • I have added tests covering my contributions.
  • I have updated the documentation accordingly.
  • I have added corresponding labels with respect to the part of the interpreter i've worked on.

Copy link

github-actions bot commented Jul 25, 2024

File Coverage Branches Missing
All files 42% 37%
HydraScript.Lib.FrontEnd.GetTokens.Impl.Lexer 91% 83%
HydraScript.Lib.BackEnd.Instructions.WithJump.Goto 81% 100% 9 14-15

Minimum allowed coverage is 20%

Generated by 🐒 cobertura-action against 941204a

@Stepami Stepami merged commit 539bf49 into master Jul 25, 2024
4 checks passed
@Stepami Stepami deleted the feature/lexer-issue-58 branch July 25, 2024 21:02
@github-actions github-actions bot locked and limited conversation to collaborators Jul 25, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
1 participant