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

Detecting duplicated components #121

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

phiwuu
Copy link
Member

@phiwuu phiwuu commented Dec 12, 2024

Add check to detect duplicated components of a record when parsing a TRLC file.

Example:

Something duplicated
{
	description = "This is fine!"
	description = "This is the duplicate."
}

The behavior of the Record_Object class is changed such that the assign method only assigns components to the record if it has not been assigned already. This is implemented by checking if the field type is different from Implicit_Null.

The Parser class asks the Record_Object if the component is Implicit_Null. If no, then an error is sent to the message handler.

@phiwuu phiwuu requested a review from a team as a code owner December 12, 2024 11:02
Add check to detect duplicated components of a record
when parsing a TRLC file.

Example:
```
Something duplicated
{
	description = "This is fine!"
	description = "This is the duplicate."
}
```

The behavior of the `Record_Object` class is changed such that the `assign` method only
assigns components to the record if it has not been assigned already.
This is implemented by checking if the field type is different from `Implicit_Null`.

The `Parser` class asks the `Record_Object` if the component is `Implicit_Null`.
If no, then an error is sent to the message handler.
@phiwuu phiwuu force-pushed the feature/detect_duplicate_components branch from ad15258 to debad86 Compare December 12, 2024 11:03
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