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

Behavior of comments in DSC script #181

Open
gaow opened this issue Apr 17, 2019 · 1 comment
Open

Behavior of comments in DSC script #181

gaow opened this issue Apr 17, 2019 · 1 comment

Comments

@gaow
Copy link
Member

gaow commented Apr 17, 2019

This caused confusion to @jean997 so I'm reporting it here. This is about behavior of # in script.

Test script:

test1: R()
  $out: 1

test2: R()
  in: $out
  $out: 1

test3: R()
  in: $out
  $out: 2

DSC:
  run: test1, # test1 * test2,
       test1 * test3

where #test1 * test2 is meant to be commented out, but not test1 * test3.

This is what the parser does:

> dsc test.dsc -h

INFO: MODULES
+------------------------------------------------------------+
|                        All modules                         |
|       | - parameters - | - input - | - output - | - type - |
| test1 |                |           |    out     |    R     |
| test2 |                |    out    |    out     |  unused  |
| test3 |                |    out    |    out     |  unused  |

INFO: PIPELINES
1: test1

INFO: PIPELINES EXPANDED
1: test1

As you can see only the first module was accounted for. This is because the comment # spans across multiple lines. . This happens just by the way I wrote the parser but it is not intentional. In other words I did not consider the scope of # for multi-line codes when I wrote it. We might want to change this behavior

@pcarbo
Copy link
Member

pcarbo commented Apr 17, 2019

We definitely want # to only create a comment on a single line.

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

2 participants