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

Allow inline C code. #7

Open
v0dro opened this issue Aug 18, 2017 · 0 comments
Open

Allow inline C code. #7

v0dro opened this issue Aug 18, 2017 · 0 comments

Comments

@v0dro
Copy link
Member

v0dro commented Aug 18, 2017

A new directive called C_INLINE should allow the user to directly write C code inside a Rubex file which will be directly copied into the resulting C code as-is. The opening and closing of this section will be demarcated on similar lines as flex's %{ ... %} directive for demarcating code sections.

The code inside this section will not be parsed with the Rubex compiler. Syntax correctness is the programmer's responsibility.

Code sample:

def meth
  int a = 4
  C_INLINE<<
    float b = 5;
    printf("%d", b);
  <<C_INLINE
end
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

1 participant