TypeFox / yang-lsp

A Language Server for YANG
http://www.yang-central.org
Apache License 2.0
51 stars 13 forks source link

Serialization fails for comment between concatenated strings #209

Open andreasjakobik opened 3 years ago

andreasjakobik commented 3 years ago

Hello,

Having comments between concatenated strings does not seem to work w.r.t. serialization.

Here is an example, original file:

list l1 {
        key id;

        leaf id {
            type string;
        }
        leaf x {
            type int32;
        }
        leaf y {
            type int32;
        }
        must "x > y" + 
            /* notice this comment in between */
             " and x * y < 100";
}

After serialization, the following is produced (notice must statement is now syntactically incorrect plus comment is gone):

list l1 {
        key id;

        leaf id {
            type string;
        }
        leaf x {
            type int32;
        }
        leaf y {
            type int32;
        }
        must "x > y" and x * y < 100";
}

Thanks, Andreas