Skip to content

Continue Long Statements on Multiple Lines #83

Open

Description

@axplusbu

Thanks for making this tool. Just a minor note: it appears that the following syntax is not supported:
www.mathworks.com/help/matlab/matlab_prog/continue-long-statements-on-multiple-lines.html

Activity

  1. geirpa commented on Jan 13, 2016

    @geirpa
    Collaborator

    I have done some changes but I have not been able to fix them entirely. The first example in the link works. The problem is that there is no whitespace on the second line so that the second number is not picked up by the node tree creator (Builder).

    This doesn't work at the moment
    x = [1.23...
    4.56];
    but
    x = [1.23...
    (whitespace) 4.56];

    works. I tried work around this by adding some whitespaces to the code loaded into the program and it worked for the case above, but a similar case (3x1, column vector):

    x = [1.5
    2.5
    3.5]

    have the same problem, but

    x = [1.5
    (whitespace) 2.5
    (whitespace) 3.5]
    works.

    Instead of adding even more whitespaces, i think the problem can be solved more generally by changing /tree/misc.py on line 394 and 395. The problem with the two cases above is that there is no whitespace so identify.space_delimited returns false, so it looks for a list separated by , instead of whitespace. I made identify.space_delimited return true, but iterate.space_list only also returns the first value in the list. It is a bit complicated to see exactly what is going on in the two functions (and I did not write this code), so I am unsure if I can fix it without breaking something else. So it might take a while to solve this.

    I think there is no problem if you use comma (,) instead of whitespace as number separator.

  2. geirpa commented on Mar 10, 2016

    @geirpa
    Collaborator

    I have done some fixes and the examples in the link works for me. There could be some variations of continue long statements that don't work.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions