Skip to content

Commit

Permalink
support #type_assert and #no_type_assert
Browse files Browse the repository at this point in the history
  • Loading branch information
laytan committed Aug 30, 2024
1 parent bd60025 commit 3df6317
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 @@ -848,6 +848,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 3df6317

Please sign in to comment.