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

basic-macros: add __FB_ARG_LOOPEXPAND__( ), __FB_OBJ_OFFSETOF__( ), __FB_OBJ_VTABLETYPE__( ) builtin macro. #312

Closed
wants to merge 1 commit into from

Conversation

skyfish4tb
Copy link
Contributor

@skyfish4tb skyfish4tb commented May 18, 2021

No description provided.

@skyfish4tb skyfish4tb changed the title basic-macros: add __FB_ARG_LOOPEXPAND__(MacroName, MacroArgCount, Args...) builtin macro. basic-macros: add __FB_ARG_LOOPEXPAND__( ), __FB_OBJ_OFFSETOF__( ), __FB_OBJ_VTABLETYPE__( ) builtin macro. May 18, 2021
@jayrm
Copy link
Member

jayrm commented Jun 18, 2021

The first commit is not related to the second and third commits, so could have submitted as separate pull requests.

__FB_ARG_LOOPEXPAND__ looks interesting - when testing seemed more like a LIST operation than a LOOP operation. Anyway it will suffer same problems as __FB_ARG_EXTRACT__ as reported in issue #321 . I am working on a fix for #321 .

For the other 2 macros, I like the concept and would like to see the use case. __FB_OBJ_OFFSETOF__() is very low level. Ok maybe should be a global macro handled at the lexer level. But it seems __FB_OBJ_VTABLETYPE__( ) would be better handled at the parser level as it is declaring a type in to the current namespace and I would think should only be allowed in places where TYPE declarations would be allowed.

…erated for variable assignment of different length, such as:

       dim as byte bValue = 123
       dim as const UInteger uiValue = bValue
@jayrm
Copy link
Member

jayrm commented Jul 4, 2021

I was surprised to see this pull request closed. I think we want to do ... something with this.

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