Skip to content

Commit

Permalink
Merge pull request #494 from laytan/support-type-assert-state-flags
Browse files Browse the repository at this point in the history
support `#type_assert` and `#no_type_assert`
  • Loading branch information
DanielGavin authored Aug 30, 2024
2 parents e32e63f + 3df6317 commit 5459458
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/odin/printer/visit.odin
Original file line number Diff line number Diff line change
Expand Up @@ -849,6 +849,12 @@ visit_state_flags :: proc(p: ^Printer, flags: ast.Node_State_Flags) -> ^Document
if .Bounds_Check in flags {
return cons(text("#bounds_check"), break_with_no_newline())
}
if .No_Type_Assert in flags {
return cons(text("#no_type_assert"), break_with_no_newline())
}
if .Type_Assert in flags {
return cons(text("#type_assert"), break_with_no_newline())
}
return empty()
}

Expand Down

0 comments on commit 5459458

Please sign in to comment.