Skip to content

AST#117

Merged
Fenriir42 merged 6 commits intomainfrom
feat/AST
Jan 16, 2026
Merged

AST#117
Fenriir42 merged 6 commits intomainfrom
feat/AST

Conversation

@Mahe-Evan
Copy link
Copy Markdown
Collaborator

@Mahe-Evan Mahe-Evan commented Dec 16, 2025

Pull Request

Description

Add a self-contained AST module defining identifier newtypes, Type, Expr, Statement, LValue, Parameter, Declaration, Program, Show instances and small helper constructors. This PR provides a single canonical AST for parser, typechecker, codegen and tests.

Related Story/Task

Closes #116
Related to #

Type of Change

  • 🐛 Bug fix (non-breaking change which fixes an issue)
  • ✨ New feature (non-breaking change which adds functionality)
  • 💥 Breaking change (fix or feature that would cause existing
    functionality to not work as expected)
  • 📚 Documentation update
  • ♻️ Refactor (no functional changes)
  • 🧪 Test addition or modification
  • ⚙️ Build/CI changes

Implementation Details

Checklist

  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
    (including regression and/or integration tests)
  • Any dependent changes have been merged and published
  • The related story/task is updated

@Mahe-Evan Mahe-Evan added this to the 2. Defense - Finale milestone Dec 16, 2025
@Mahe-Evan Mahe-Evan self-assigned this Dec 16, 2025
@Mahe-Evan Mahe-Evan added 3. type: feature Adds new functionality or capability to the project. 8. part: 2-custom-language Second deliverable: Custom language with compiler and VM. 7. component: ast Code related to the abstract syntax tree representation of source code labels Dec 16, 2025
@Mahe-Evan Mahe-Evan added this to GlaDOS Dec 16, 2025
@github-project-automation github-project-automation Bot moved this to Created in GlaDOS Dec 16, 2025
@github-actions github-actions Bot added 7. component: tests Code related to the test suite, test framework, test utilities, or test coverage. 1. difficulty : hard Complex task requiring significant expertise or deep research. labels Dec 16, 2025
@github-actions
Copy link
Copy Markdown

⚠️ Release label required

This PR targets main but has no release label (6. release: major/minor/patch).

Please add one to trigger automatic version bumping:

  • major: Breaking changes (x.0.0)
  • minor: New features (0.x.0)
  • patch: Bug fixes (0.0.x)

@renman-ymd renman-ymd removed the 3. type: feature Adds new functionality or capability to the project. label Dec 17, 2025
@renman-ymd renman-ymd moved this from Created to In Review in GlaDOS Dec 17, 2025
@renman-ymd renman-ymd added the 5. status: waiting-for-review This PR is waiting for reviewer feedback label Jan 7, 2026
@renman-ymd renman-ymd added 5. status: ready-for-merge This PR is approved and ready to be merged and removed 5. status: waiting-for-review This PR is waiting for reviewer feedback labels Jan 7, 2026
@renman-ymd renman-ymd moved this from In Review to Waiting Merge in GlaDOS Jan 7, 2026
@renman-ymd renman-ymd force-pushed the feat/AST branch 2 times, most recently from 0ed6114 to 89756d2 Compare January 7, 2026 13:25
@github-actions github-actions Bot added 7. component: parser Code related to the parser that processes source code syntax. 7. component: lisp-interpreter Code change related to the lisp interpreter labels Jan 7, 2026
@renman-ymd renman-ymd self-assigned this Jan 7, 2026
Comment thread ast/src/AST/Types/Operator.hs
Comment thread ast/src/AST/Types/Operator.hs Outdated

data SourcePos = SourcePos
{ -- | The source file path
posFile :: !FilePath',
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what does ! do

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This means that Haskell will not try to be lazy: the computation is immediate.

Comment thread ast/src/AST/Types/AST.hs
Copy link
Copy Markdown
Contributor

@Ciznia Ciznia left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have some question

@renman-ymd renman-ymd added 5. status: waiting-for-review This PR is waiting for reviewer feedback and removed 5. status: ready-for-merge This PR is approved and ready to be merged labels Jan 9, 2026
@renman-ymd renman-ymd moved this from Waiting Merge to In Review in GlaDOS Jan 9, 2026
@Fenriir42 Fenriir42 merged commit 7bc36b8 into main Jan 16, 2026
7 checks passed
@github-project-automation github-project-automation Bot moved this from In Review to Closed in GlaDOS Jan 16, 2026
@Ciznia Ciznia deleted the feat/AST branch January 18, 2026 12:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

1. difficulty : hard Complex task requiring significant expertise or deep research. 5. status: waiting-for-review This PR is waiting for reviewer feedback 7. component: ast Code related to the abstract syntax tree representation of source code 7. component: lisp-interpreter Code change related to the lisp interpreter 7. component: parser Code related to the parser that processes source code syntax. 7. component: tests Code related to the test suite, test framework, test utilities, or test coverage. 8. part: 2-custom-language Second deliverable: Custom language with compiler and VM.

Projects

Status: Closed

Development

Successfully merging this pull request may close these issues.

[TASK] AST

4 participants