| 1999 | } |
| 2000 | |
| 2001 | Jakt::parser::ParsedAlias Jakt::parser::Parser::parse_using() { |
| 2002 | { |
| 2003 | Jakt::parser::ParsedAlias alias = Jakt::parser::ParsedAlias(JaktInternal::OptionalNone(),DynamicArray<Jakt::parser::ParsedNameWithGenericParameters>::create_with({})); |
| 2004 | for (;;){ |
| 2005 | {auto&& __jakt_match_variant = this->current(); |
| 2006 | switch(__jakt_match_variant.__jakt_init_index()) { |
| 2007 | case 55 /* Eol */:case 61 /* As */:case 56 /* Eof */:{ |
| 2008 | break; |
| 2009 | } |
| 2010 | goto __jakt_label_17;case 6 /* ColonColon */:{ |
| 2011 | this->index++; |
| 2012 | continue; |
| 2013 | } |
| 2014 | goto __jakt_label_17;case 3 /* Identifier */: { |
| 2015 | auto&& __jakt_match_value = __jakt_match_variant.as.Identifier;ByteString const& name = __jakt_match_value.name; |
| 2016 | Jakt::utility::Span const& span = __jakt_match_value.span; |
| 2017 | { |
| 2018 | Jakt::parser::ParsedNameWithGenericParameters parsed_name = Jakt::parser::ParsedNameWithGenericParameters(name,span,DynamicArray<NonnullRefPtr<typename Jakt::parser::ParsedType>>::create_with({})); |
| 2019 | this->index++; |
| 2020 | if (this->current().__jakt_init_index() == 28 /* LessThan */){ |
| 2021 | this->index++; |
| 2022 | while (!this->eof()){ |
| 2023 | {auto&& __jakt_match_variant = this->current(); |
| 2024 | switch(__jakt_match_variant.__jakt_init_index()) { |
| 2025 | case 26 /* GreaterThan */:{ |
| 2026 | this->index++; |
| 2027 | break; |
| 2028 | } |
| 2029 | goto __jakt_label_18;case 52 /* Comma */:case 55 /* Eol */:{ |
| 2030 | this->index++; |
| 2031 | } |
| 2032 | goto __jakt_label_18;case 33 /* RightShift */:{ |
| 2033 | this->inject_token(Jakt::lexer::Token::GreaterThan(this->current().span())); |
| 2034 | this->index += static_cast<size_t>(1ULL); |
| 2035 | break; |
| 2036 | } |
| 2037 | goto __jakt_label_18;default:{ |
| 2038 | size_t const index_before = this->index; |
| 2039 | NonnullRefPtr<typename Jakt::parser::ParsedType> const inner_type = this->parse_typename(); |
| 2040 | if (index_before == this->index){ |
| 2041 | this->error(ByteString::from_utf8_without_validation("Expected type name"sv),this->current().span()); |
| 2042 | break; |
| 2043 | } |
| 2044 | parsed_name.generic_parameters.push(inner_type); |
| 2045 | } |
| 2046 | goto __jakt_label_18;}/*switch end*/ |
| 2047 | break;}goto __jakt_label_18; __jakt_label_18:;; |
| 2048 | } |
| 2049 | } |
| 2050 | alias.target.push(parsed_name); |
| 2051 | } |
| 2052 | goto __jakt_label_17;};/*case end*/ |
| 2053 | case 0 /* SingleQuotedString */: { |
| 2054 | auto&& __jakt_match_value = __jakt_match_variant.as.SingleQuotedString;Jakt::utility::Span const& span = __jakt_match_value.span; |
| 2055 | { |
| 2056 | this->error(ByteString::from_utf8_without_validation("Expected alias target name"sv),span); |
| 2057 | break; |
| 2058 | } |
no test coverage detected