rules_spm icon indicating copy to clipboard operation
rules_spm copied to clipboard

Add support for parsing submodules

Open pswaminathan opened this issue 2 years ago • 3 comments

pswaminathan avatar May 22 '22 20:05 pswaminathan

Sorry for the radio silence on this end. I am out on vacation for the next week and a half. I will take a look at this PR when I am back online.

cgrindel avatar Jun 08 '22 19:06 cgrindel

@pswaminathan I am so sorry for the delay in reviewing this. It fell off of my radar. Thank you for sending it.

I think that the submodule parsing should run through the same parsing code as the module parsing. Since we cannot rely on recursive functions, I am thinking that we implement it like so:

  1. Extract the submodule tokens,
  2. Return unprocessed submodule tokens as a declaration,
  3. The top-level module function detects the unprocessed submodule declaration and runs it through the module processing

What do you think? I am working on an implementation. I will send it out for review when I have something that works.

cgrindel avatar Sep 03 '22 14:09 cgrindel

@pswaminathan I added my first pass at submodule parsing in #169. If that looks reasonable to you, do you think we should close this PR?

cgrindel avatar Sep 06 '22 14:09 cgrindel