Skip to content
This repository has been archived by the owner on Sep 9, 2024. It is now read-only.

feat: alt constructor entrypoint #223

Merged
merged 4 commits into from
Nov 1, 2022
Merged

Conversation

Maddiaa0
Copy link
Member

Overview

Similarly to #221, adds a command line flag that allows for compiling an alternative constructor.

Usage

The following command
huffc ./test.huff -b -l ALT_CONSTRUCTOR
test file yields:

#define macro CONSTRUCTOR() = {
    0x1
}

#define macro MAIN() = {
    0x1
}

#define macro ALT_CONSTRUCTOR() = {
    0x2 0x00 0x00 0x00
}

600260006000600060028060113d393df36001, which is as expected.

RFC:

  • Currently -c is already taken so I have decided to use -l as the short arg. Do you have a preference?

closes #222

@Maddiaa0 Maddiaa0 requested a review from refcell October 25, 2022 14:32
@Maddiaa0
Copy link
Member Author

Maddiaa0 commented Oct 25, 2022

@abigger87 Looks like new string interpolation syntax is triggering clippy. Reckon this pr is fine as is and the clippy warnings should be fixed in the seperate pr?

edit:
clippy fix pr: #224

refcell
refcell previously approved these changes Nov 1, 2022
Copy link
Collaborator

@refcell refcell left a comment

Choose a reason for hiding this comment

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

LGTM

@refcell refcell merged commit 7d356f6 into stage Nov 1, 2022
@refcell refcell mentioned this pull request Nov 1, 2022
@refcell refcell deleted the md/alt-constructor-entrypoint branch February 26, 2023 19:00
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants