Starting a new branch

Open
#44 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
Half a day
Newbie friendliness
73/100
Issue type
Feature
Clarity
Clearly specified
Activity status
Active
Tech stack
csharp
Domain
compilers, tooling

Research direction

Start by reading the existing StartBranch(string token, IState<T> state) overload and the StringTransition API it should accept. Then add the overload that takes a transition, mirroring how existing branch-starting code threads state through. Add tests covering a transition with a pattern such as test|Test|TEST, and update the documentation that mentions StartBranch. Done means the new overload is usable as shown, with tests and docs updated.

Written by the indexing model from the issue text.

Description

good first issue usability

What we can do now

To start a branch, we use the method StartBranch(string token, IState<T> state)

The problem

If we want to start a branch from different tokens, we need to use this method again and again for similar tokens

For example

parser.StartBranch("test", state);
parser.StartBranch("Test", state);
parser.StartBranch("TEST", state);

The solution

Surcharche the method to also accept a transition. Since StringTransition can handle a regular expression, the above example can become

parser.StartBranch(new StringTransition(state).AddPattern("test|Test|TEST"))

Like always, don't forget to add tests and documentation

Dominant language
C#
Stars
0
Forks
0
Avg merge
3d 4h
Merged PRs (30d)
5

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from Natvs/Nt.SyntaxParser

All issues in Natvs/Nt.SyntaxParser

Similar issues

More C# issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.