fix: parse entity and architecture only at beginning The file parser treated entity and architecture keywords at beginning and end of architecture equally, and expected an identifier afterwards. This identifier is not required. The change made the parser always go past the end of the entity or architecture declaration.
1 files changed, 7 insertions(+), 0 deletions(-) M src/file_parser.rs
M src/file_parser.rs => src/file_parser.rs +7 -0
@@ 155,6 155,9 @@ impl FileParser { } } stream.skip_until(|k| k == Kind::Architecture)?; stream.skip_until(|k| k == Kind::SemiColon)?; let architecture = ParsedArchitecture { name: architecture_name, @@ entity_name, 205,6 208,10 @@ impl FileParser { stream.expect_kind(Kind::Entity)?; let name = Self::parse_identifier(stream)?; stream.skip_until(|k| k == Kind::Entity)?; stream.skip_until(|k| k == Kind::SemiColon)?; Ok(ParsedEntity { name, architecture: None,