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

stdlib: temporarily add AST pattern matching #882

Merged

Conversation

bung87
Copy link
Contributor

@bung87 bung87 commented Sep 8, 2023

Summary

Add the ast_pattern_matching module to the experimental standard
library. It implements pattern matching for NimNode AST and is copied
from https://github.com/krux02/ast-pattern-matching.

The first iteration of the language-server protocol (LSP) implementation
is going to use the pattern matching, but it's likely that the module
will be removed from the standard library again.

Details

A copy of the ast-pattern-matching implementation already existed
within the tests directory, where it is used by the tastpec.nim
test. The module is moved to the lib/experimental directory and the
import is adjusted.

@saem saem added refactor Implementation refactor stdlib Standard library labels Sep 9, 2023
@bung87 bung87 changed the title ast_pattern_matching: move to experimental ast_pattern_matching: move from tests to experimental Sep 10, 2023
@zerbina zerbina changed the title ast_pattern_matching: move from tests to experimental stdlib: temporarily add AST pattern matching Sep 10, 2023
@zerbina
Copy link
Collaborator

zerbina commented Sep 10, 2023

I've update the PR message and title. The issues with the previous one were as follows:

  • the summary was missing a short description of what the module does and why it's added to the experimental standard library
  • the reason provided in the details section was not something concrete ("it may be useful")

Since it's intended for use by the LSP during the latter's development, I've explicitly mentioned the addition's uncertain future.

@bung87 bung87 force-pushed the move-ast_pattern_matching-to-experimental branch from 3d35d4c to 6b52799 Compare September 10, 2023 19:20
@zerbina
Copy link
Collaborator

zerbina commented Sep 11, 2023

/merge

@github-actions
Copy link

Merge requested by: @zerbina

Contents after the first section break of the PR description has been removed and preserved below:


@chore-runner chore-runner bot added this pull request to the merge queue Sep 11, 2023
Merged via the queue into nim-works:devel with commit 704308b Sep 11, 2023
18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
refactor Implementation refactor stdlib Standard library
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants