uri top-level property

Parser<Map<Symbol, dynamic>> uri
final

Implementation

final uri = seq5(
  seq2(_scheme, ':'.toParser()).optional(),
  seq2('//'.toParser(), _authority).optional(),
  _path,
  seq2('?'.toParser(), _query).optional(),
  seq2('#'.toParser(), _fragment).optional(),
).map5((scheme, authority, path, query, fragment) => <Symbol, dynamic>{
      #scheme: scheme?.$1,
      #authority: authority?.$2,
      ...lib_authority.authority.parse(authority?.$2 ?? '').value,
      #path: path,
      #query: query?.$2,
      #params: lib_query.query.parse(query?.$2 ?? '').value,
      #fragment: fragment?.$2,
    });