Skip to content

Commit

Permalink
feat: Allow tox_ prefixes for custom attributes.
Browse files Browse the repository at this point in the history
This is needed if we ever want to annotate the public API with these
attributes.
  • Loading branch information
iphydf committed Nov 9, 2024
1 parent 4d22ca2 commit 20a1ee0
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/Language/Cimple/Lexer.x
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,11 @@ tokens :-
<0> "#define" { mkL PpDefine `andBegin` ppSC }
<0> "#undef" { mkL PpUndef }
<0> "#include" { mkL PpInclude }
<0,ppSC> "bitwise" { mkL KwBitwise }
<0,ppSC> "tox_"?"bitwise" { mkL KwBitwise }
<0,ppSC> "tox_"?"force" { mkL KwForce }
<0,ppSC> "tox_"?"non_null" { mkL KwNonNull }
<0,ppSC> "tox_"?"nullable" { mkL KwNullable }
<0,ppSC> "tox_"?"owner" { mkL KwOwner }
<0,ppSC> "break" { mkL KwBreak }
<0,ppSC> "case" { mkL KwCase }
<0,ppSC> "const" { mkL KwConst }
Expand All @@ -162,12 +166,8 @@ tokens :-
<0,ppSC> "enum" { mkL KwEnum }
<0,ppSC> "extern" { mkL KwExtern }
<0,ppSC> "for" { mkL KwFor }
<0,ppSC> "force" { mkL KwForce }
<0,ppSC> "goto" { mkL KwGoto }
<0,ppSC> "if" { mkL KwIf }
<0,ppSC> "non_null" { mkL KwNonNull }
<0,ppSC> "nullable" { mkL KwNullable }
<0,ppSC> "owner" { mkL KwOwner }
<0,ppSC> "return" { mkL KwReturn }
<0,ppSC> "sizeof" { mkL KwSizeof }
<0,ppSC> "static" { mkL KwStatic }
Expand Down

0 comments on commit 20a1ee0

Please sign in to comment.