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

Migrate parsing to ixdtf crate #50

Merged
merged 5 commits into from
Jun 3, 2024
Merged

Migrate parsing to ixdtf crate #50

merged 5 commits into from
Jun 3, 2024

Conversation

nekevss
Copy link
Member

@nekevss nekevss commented Jun 2, 2024

This would close #39.

This migrates us from the current parser to the ixdtf crate.

As mentioned in #48, this also adds a macro temporal_assertion for asserting with the goal of being able to use that functionality instead of expect going forward.

Copy link
Member

@jedel1043 jedel1043 left a comment

Choose a reason for hiding this comment

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

Overall good, I just want to have a discussion on the new macro.

Copy link
Member

@jedel1043 jedel1043 left a comment

Choose a reason for hiding this comment

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

LGTM!

/// A utility function for parsing a `YearMonth` string
pub(crate) fn parse_year_month(source: &str) -> TemporalResult<IxdtfParseRecord> {
let mut first_calendar: Option<Annotation> = None;
let mut critical_duplicate_calendar = false;
Copy link
Member

@jedel1043 jedel1043 Jun 3, 2024

Choose a reason for hiding this comment

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

Is this required? It is assigned but never used after parsing.

@nekevss nekevss merged commit b30f3c2 into main Jun 3, 2024
5 checks passed
@jedel1043 jedel1043 deleted the ixdtf-parser-update branch June 3, 2024 22:24
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.

Migrate to the ixdtf crate for datetime parsing
3 participants