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

[Lang] Adds source code statement #409

Merged
merged 4 commits into from
Oct 24, 2020
Merged

Conversation

dmed256
Copy link
Member

@dmed256 dmed256 commented Oct 24, 2020

Description

  • Adds sourceCodeStatement so we can forcefully insert raw source code when not yet available
    • For example, adding C++ code that the parser can't handle
  • Adds OKL_MODE macro that is defined as the upper-cased mode (e.g. CUDA -> "CUDA", OpenMP -> "OPENMP")
  • Replaces janky expressionStatement + identifierNode hacks with sourceCodeStatement

@codecov
Copy link

codecov bot commented Oct 24, 2020

Codecov Report

Merging #409 into main will decrease coverage by 0.02%.
The diff coverage is 94.47%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #409      +/-   ##
==========================================
- Coverage   76.36%   76.33%   -0.03%     
==========================================
  Files         239      240       +1     
  Lines       18411    18425      +14     
==========================================
+ Hits        14059    14065       +6     
- Misses       4352     4360       +8     
Impacted Files Coverage Δ
bin/occa.cpp 38.32% <0.00%> (-0.15%) ⬇️
include/occa/lang/statement/statement.hpp 100.00% <ø> (ø)
src/lang/modes/cuda.cpp 98.43% <ø> (-0.03%) ⬇️
src/lang/modes/metal.cpp 84.94% <ø> (-0.17%) ⬇️
src/lang/modes/opencl.cpp 94.70% <ø> (-0.04%) ⬇️
src/lang/statement/statement.cpp 70.99% <ø> (ø)
src/lang/statement/sourceCodeStatement.cpp 65.00% <65.00%> (ø)
include/occa/lang/utils/array.hpp 100.00% <100.00%> (ø)
src/lang/modes/withLauncher.cpp 96.72% <100.00%> (-0.10%) ⬇️
src/lang/preprocessor.cpp 80.45% <100.00%> (+0.04%) ⬆️
... and 1 more

@dmed256 dmed256 merged commit 9306a79 into main Oct 24, 2020
@dmed256 dmed256 deleted the lang/add-source-code-statement branch October 24, 2020 22:39
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.

1 participant