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

Update for C and OpenCL C #2196

Merged
merged 4 commits into from
Feb 18, 2020

Conversation

RunDevelopment
Copy link
Member

Since some of the problems OpenCL C had were caused by C, I fixed them there. This also has the added benefit that some of the fixes in C also apply for languages derived from C (e.g. C++).

Changes

C:

  • Struct names can now be preceded by an __attribute__ declaration.
  • New keyword: __attribute__. This is a compiler-specific keyword and while I don't think Prism should include ever compiler-specific keyword, it seemed strange to support __attribute__((...)) between struct and the name of the structure but not the keyword itself.
  • Allowed any number of spaces between a function name and (. This fix is also visible in C++.

OpenCL C:

  • Updated constants. The list was incomplete and partly incorrect.
  • Added support for half number literals.
  • Added support for boolean literals.
  • Removed the function-opencl-kernel token. I honestly don't know why this was added in the first place. All functions in C are highlighted by the preceding (, so there's no need for another huge list to maintain.

@RunDevelopment RunDevelopment merged commit 674f4b3 into PrismJS:master Feb 18, 2020
@RunDevelopment RunDevelopment deleted the c-and-openclc-update branch February 18, 2020 20:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant