mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-09-24 22:02:23 +01:00
This adds the `static` token to the lexer and parses it as a modifier. In check, `FullPatternStack::Kind::FieldDecl` is now used for both static and non-static vars. Static vars get treated basically the same as `NameBindingDecl`s. Global initialization is used for static var initializers. To make the necessary stack information available to `pattern_match.cpp`, the `full_pattern_stack` and `decl_introducer_state_stack` are now popped later in `handle_let_and_var.cpp`. In lowering, each class's body is checked for `VarStorage` insts and lowered the same as global vars.