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

asm: split out AST into separate package #9

Merged
merged 4 commits into from
Nov 20, 2024
Merged

asm: split out AST into separate package #9

merged 4 commits into from
Nov 20, 2024

Conversation

fjl
Copy link
Owner

@fjl fjl commented Nov 18, 2024

This change introduces a new package internal/ast for the AST and parser. Before, the compiler used the AST to store its internal state, and even defined methods directly on AST objects. As I move towards the implementation of a gofmt-like tool and stack checker, I need an intermediate representation that can be shared across packages.

The compiler now has a concept of 'sections' in the output program. At this time, sections are used to store a reference to the AST document and macro arguments for use by the evaluator. They do not influence the output in any other way. However, the concept of sections will also be useful for the implementation of EOF support.

Note that the Go compiler version requirement is updated to Go 1.23.

fjl added 4 commits November 18, 2024 15:06
This change introduces a new package internal/ast for the AST and parser. Before, the
compiler used the AST to store its internal state, and even defined methods directly on
AST objects. As I move towards the implementation of a gofmt-like tool and stack checker,
I need an intermediate representation that can be shared across packages.

The compiler now has a concept of 'sections' in the output program. At this time, sections
are used to store a reference to the AST document and macro arguments for use by the
evaluator. They do not influence the output in any other way. However, the concept of
sections will also be useful for the implementation of EOF support.

Note that the Go compiler version requirement is updated to Go 1.23.
@fjl fjl merged commit b2b3512 into master Nov 20, 2024
1 check passed
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