Starting a new branch

未關閉
#44 0 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視

還沒有人認領這個 Issue。

評估

難度
3/5
預估耗時
半天
新手友好度
73/100
Issue 類型
功能
描述清晰度
描述清楚
活躍度
活躍
技術堆疊
csharp
領域
compilers, tooling

研究方向

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.

由索引模型根據 Issue 內容生成。

描述

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

主要語言
C#
星號
0
分支
0
平均合併
3 天 4 小時
30 天內合併 PR
5

環境準備

這個專案沒有提供開發容器、Dockerfile 或貢獻指南,環境需要你自己搭建:先看它的 README,通用步驟見我們的新手貢獻指南。

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

Natvs/Nt.SyntaxParser 的其他 Issue

查看 Natvs/Nt.SyntaxParser 的全部 Issue

相似的 Issue

更多 C# Issue

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。