McStasMcXtrace / mccode-antlr

McCode grammar implemented with ANTLR4
1 stars 0 forks source link

[Refactor] finish switch to real McCode sources #46

Closed g5t closed 7 months ago

g5t commented 7 months ago
g5t commented 7 months ago

One reason to use the upstream sources: I changed the return type of _getcomp_index from int to long at some point, probably because the index of a component is long valued. That change was not propagated back to the main repository, so tests here fail when the 'real' sources are used.

@willend Can you confirm whether the component index property is long valued? And, assuming it is, would you accept a PR to change the _getcomp_index return from int to long?

g5t commented 7 months ago

The component _index property is indeed long valued. See https://github.com/McStasMcXtrace/McCode/blob/c4c9421d630767f612703947bad4c82941220398/mcstas/src/cogen.c.in#L542

g5t commented 7 months ago

McCode #1597 should track resolution of the type discrepancy. The last commit here may need to be undone as a result.