Skip to content

Commit

Permalink
Merge pull request #18537 from jketema/elifdef
Browse files Browse the repository at this point in the history
C++: Support `#elifdef`, `#elifndef`, and MSVC's `#import`
  • Loading branch information
jketema authored Jan 21, 2025
2 parents b4c8390 + ac18e74 commit 91f6498
Show file tree
Hide file tree
Showing 16 changed files with 10,188 additions and 332 deletions.
2,432 changes: 2,432 additions & 0 deletions cpp/downgrades/59cb96ca699929b63941e81905f9b8de7eed59a6/old.dbscheme

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
class PreprocessorDirective extends @preprocdirect {
string toString() { none() }
}

class Location extends @location_default {
string toString() { none() }
}

bindingset[kind]
int getKind(int kind) {
if kind = 14
then result = 6 // Represent MSFT #import as #include
else
if kind = 15 or kind = 6
then result = 3 // Represent #elifdef and #elifndef as #elif
else result = kind
}

from PreprocessorDirective ppd, int kind, Location l
where preprocdirects(ppd, kind, l)
select ppd, getKind(kind), l
Loading

0 comments on commit 91f6498

Please sign in to comment.