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

Add astcatalog and use it in gen-ast-pos #256

Merged

Conversation

makenowjust
Copy link
Collaborator

@makenowjust makenowjust commented Jan 6, 2025

This PR introduces a new internal utility package named astcatalog.
Package astcatalog provides a catalog of AST node types obtained from ast/ast.go.

This PR rewrites gen-ast-pos to use astcatalog instead of regexp matching, and this PR also fixes some errors in ast/ast.go docs.


Important changes for contributors:

  • I decide to mark ast.go and ast_*.go as conventional. This means that these files are used for automatic generation (e.g., gen-ast-pos), and so we need to take care of the structures of these files.
    • Thus, I renamed const.go to ast_const.go.
  • The conventions to be followed are written at the top of these files.

@makenowjust makenowjust changed the title Add astcatalog and use it in ast-gen-pos Add astcatalog and use it in gen-ast-pos Jan 11, 2025
@makenowjust makenowjust marked this pull request as ready for review January 11, 2025 05:11
@makenowjust makenowjust merged commit 7a98aad into cloudspannerecosystem:main Jan 11, 2025
2 checks passed
@makenowjust makenowjust deleted the feature/astcatalog branch January 11, 2025 05:12
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.

1 participant