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

feat: add support for old property syntax. #18

Merged

Conversation

apozharski
Copy link
Contributor

This syntax is deprecated as far as I can tell, however matlab code tends to have a long shelf life.
Here is an example of this syntax in practice (again from the matllabdomain test suite):

classdef PropTypeOld
    properties
        link_name@char = 'none';
        pos@double vector = zeros(3,1);
        rotm@double matrix = zeros(3,3);
        idx@uint8 scalar = 0;
    end
end

It seems that Mathworks has purged documentation of this syntax (or at least I have not been able to find it) so this is an estimation from what I have seen in old projects and matlabdomain test suite. I have reached out to Mathworks support to try and dig up some official documentation however haven't heard back as of yet.

@acristoffers
Copy link
Owner

This was removed like 14 years ago, so I don't think they will care. I'll accept this PR once you remove the generated files and rebase. This is kind of a breaking change as the node is now quite different and tools that make use of it will have to be modified. I was trying to avoid that, but since there is a tool that needs it, I think it is fair to support it.

Just a request though: add an alias to $.identifier to the choice of matrix/vector/scalar. That is going to make it so 3 downstream projects don't need modification.

@apozharski apozharski force-pushed the parse-old-property-definitions branch from 8365c94 to a5a2ef2 Compare August 20, 2024 06:43
This syntax is deprecated as far as I can tell, however matlab code tends to have a long shelf life.
@apozharski apozharski force-pushed the parse-old-property-definitions branch from a5a2ef2 to a3cc1d7 Compare August 20, 2024 06:50
@acristoffers acristoffers merged commit 9049558 into acristoffers:main Aug 20, 2024
6 checks passed
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.

2 participants