Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/cdl_parser/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ def main(args: list[str] | None = None) -> int:
print(f" System: {desc.system}")
print(f" Point Group: {desc.point_group}")
print(f" Forms ({len(desc.forms)}):")
for form in desc.forms:
for form in desc.flat_forms():
print(f" {form.miller} @ scale={form.scale}")
if desc.modifications:
print(f" Modifications ({len(desc.modifications)}):")
Expand Down
4 changes: 2 additions & 2 deletions src/cdl_parser/parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -752,7 +752,7 @@ def _parse_feature_value(self) -> int | float | str:
elif token.type == TokenType.FLOAT:
return float(self._advance().value)
elif token.type == TokenType.IDENTIFIER:
return self._advance().value.lower()
return str(self._advance().value).lower()
elif token.type == TokenType.POINT_GROUP:
# Handle numeric point groups like '1', '3' as values
value = token.value
Expand All @@ -762,7 +762,7 @@ def _parse_feature_value(self) -> int | float | str:
return result
except ValueError:
pass
return self._advance().value
return str(self._advance().value)
raise ParseError("Expected feature value", position=token.position)

def _parse_phenomenon(self) -> PhenomenonSpec:
Expand Down
Loading