| 1822 | } |
| 1823 | |
| 1824 | JaktInternal::Optional<Jakt::parser::ParsedAttribute> Jakt::parser::Parser::parse_attribute() { |
| 1825 | { |
| 1826 | Jakt::utility::Span const span = this->current().span(); |
| 1827 | ByteString const name = ({ |
| 1828 | auto&& _jakt_value = ([&]() -> JaktInternal::ExplicitValueOrControlFlow<ByteString, JaktInternal::Optional<Jakt::parser::ParsedAttribute>>{ |
| 1829 | auto&& __jakt_match_variant = this->current(); |
| 1830 | switch(__jakt_match_variant.__jakt_init_index()) { |
| 1831 | case 3 /* Identifier */: { |
| 1832 | auto&& __jakt_match_value = __jakt_match_variant.as.Identifier;ByteString const& name = __jakt_match_value.name; |
| 1833 | { |
| 1834 | this->index++; |
| 1835 | return JaktInternal::ExplicitValue<ByteString>(name); |
| 1836 | } |
| 1837 | VERIFY_NOT_REACHED(); |
| 1838 | };/*case end*/ |
| 1839 | case 100 /* This */:{ |
| 1840 | this->index++; |
| 1841 | return JaktInternal::ExplicitValue<ByteString>(ByteString::from_utf8_without_validation("this"sv)); |
| 1842 | } |
| 1843 | VERIFY_NOT_REACHED(); |
| 1844 | default:{ |
| 1845 | this->error(ByteString::from_utf8_without_validation("Expected identifier"sv),this->current().span()); |
| 1846 | this->index++; |
| 1847 | return JaktInternal::OptionalNone(); |
| 1848 | } |
| 1849 | }/*switch end*/ |
| 1850 | }() |
| 1851 | ); |
| 1852 | if (_jakt_value.is_return()) |
| 1853 | return _jakt_value.release_return(); |
| 1854 | _jakt_value.release_value(); |
| 1855 | }); |
| 1856 | JaktInternal::DynamicArray<Jakt::parser::ParsedAttributeArgument> arguments = DynamicArray<Jakt::parser::ParsedAttributeArgument>::create_with({}); |
| 1857 | if (this->current().__jakt_init_index() == 7 /* LParen */){ |
| 1858 | this->index++; |
| 1859 | while ((!this->eof()) && (!(this->current().__jakt_init_index() == 8 /* RParen */))){ |
| 1860 | Jakt::utility::Span const span = this->current().span(); |
| 1861 | ByteString const argument_name = ({ |
| 1862 | auto&& _jakt_value = ([&]() -> JaktInternal::ExplicitValueOrControlFlow<ByteString, JaktInternal::Optional<Jakt::parser::ParsedAttribute>>{ |
| 1863 | auto&& __jakt_match_variant = this->current(); |
| 1864 | switch(__jakt_match_variant.__jakt_init_index()) { |
| 1865 | case 3 /* Identifier */: { |
| 1866 | auto&& __jakt_match_value = __jakt_match_variant.as.Identifier;ByteString const& name = __jakt_match_value.name; |
| 1867 | { |
| 1868 | this->index++; |
| 1869 | return JaktInternal::ExplicitValue<ByteString>(name); |
| 1870 | } |
| 1871 | VERIFY_NOT_REACHED(); |
| 1872 | };/*case end*/ |
| 1873 | case 100 /* This */:{ |
| 1874 | this->index++; |
| 1875 | return JaktInternal::ExplicitValue<ByteString>(ByteString::from_utf8_without_validation("this"sv)); |
| 1876 | } |
| 1877 | VERIFY_NOT_REACHED(); |
| 1878 | case 1 /* QuotedString */: { |
| 1879 | auto&& __jakt_match_value = __jakt_match_variant.as.QuotedString;ByteString const& quote = __jakt_match_value.quote; |
| 1880 | { |
| 1881 | this->index++; |
no test coverage detected