Skip to content

Add module imports details - #69

Merged
mitshell merged 3 commits into
pycrate-org:masterfrom
lukem:add-module-imports-details
Oct 10, 2026
Merged

mitshell merged 3 commits into
pycrate-org:masterfrom
lukem:add-module-imports-details

Conversation

@lukem

@lukem lukem commented Sep 24, 2026

Copy link
Copy Markdown
Contributor

asn1c: Improvements to IMPORTS handling

Fail on IMPORTS with invalid trailing comma before the FROM.

Add a per-module list _imports_, where each item is a dict per imported module containing:

  • name: str, module name
  • obj: list of str, all objects' name defined in the module
  • oid: list of uint or None, OID of the module
  • oidstr: str or None
  • with: str or None, WITH expression

(This allows consumers to detect inter-module OID mismatches and handle imported types.)

Add _imports_ list to each module, where each value is a
dict per imported module, each dict comprised of:
- name: str, module name
- obj: list of str, all objects' name defined in the module
- oid: list of uint or None, OID of the module
- oidstr: str or None
- with: str or None, WITH expression
@mitshell
mitshell merged commit dda2021 into pycrate-org:master Oct 10, 2026
13 checks passed
@mitshell

Copy link
Copy Markdown
Member

Thanks for the PR

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