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

Strange and incorrect beautification #157

Open
Remillard opened this issue Feb 20, 2020 · 4 comments
Open

Strange and incorrect beautification #157

Remillard opened this issue Feb 20, 2020 · 4 comments

Comments

@Remillard
Copy link
Owner

Found this happening, not sure why it's happening and not a lot of time to debug at the moment:

entity asdf is
	port (

	);
end entity asdf;

​entity register is
port (
	A   : in  std_logic_vector(7 downto 0);
	clk : in  std_logic;
	clr : in  std_logic;
	B   : out std_logic_vector(7 downto 0)
);
end register;

Note that the port clause in the second entity isn't indenting

@Remillard
Copy link
Owner Author

Okay, figured a partial out. If the entity is the first character of the buffer, it doesn't identify it correctly. However in the example, it's not the first character of the buffer so ... not sure what's going on here. It just evaluates as default.

@Remillard
Copy link
Owner Author

I think it has something to do with using ^entity as the pattern. I altered it to excluding end and without the line anchor and it seems to fix everything. Will have to play with it a little more before I trust this completely.

@Remillard
Copy link
Owner Author

Had same issue on architecture just now. Came from importing some badly formatted student code and again architecture wasn't being evaluated until I lost the leading line anchor and put in the (?<!end ) part. Wonder if there was a hidden character in there somewhere.

@Remillard
Copy link
Owner Author

However this solution seems to screw up component direct entity instantiation, so undoing this for now and will have to investigate further when I can.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant