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

Implement literal pgn #590

Merged
merged 1 commit into from
Oct 27, 2024
Merged

Conversation

lenguyenthanh
Copy link
Member

@lenguyenthanh lenguyenthanh commented Oct 26, 2024

I put it in testKit for now, as I don't see using it in prod. But could be useful for testing.

the usage is in the tests:

  import macros.*
  test("pgn macro"):
    val pgn = pgn"1. e4 e5 2. Nf3 Nc6" // We validate this at compile time.
    assert(pgn.tree.isDefined)
    assertEquals(pgn.toPgn.toString, "1. e4 e5 2. Nf3 Nc6")

@ornicar ornicar merged commit 99e0243 into lichess-org:master Oct 27, 2024
3 checks passed
@lenguyenthanh lenguyenthanh deleted the literal-pgn branch October 27, 2024 10:16
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.

2 participants