Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Parsing of path-references to pages and modules #1142

Merged
merged 11 commits into from
Jul 10, 2024

Commits on Jul 10, 2024

  1. Parse path-references

    This add 3 new kinds of references to pages and units:
    
    - Relative paths: {!./foo} {!foo/bar}
    - Absolute paths: {!/foo}
    - Paths relative to the current package: {!//foo}
    
    The last component of the path can point to a page or a root module. It
    can be prefixed: {!foo/page-bar} {!foo/module-Bar}.
    
    Paths can be on the right of a dot: {!foo/bar.label}.
    
    The new reference constructors are plumbed through xref2 but unimplemented.
    Julow committed Jul 10, 2024
    Configuration menu
    Copy the full SHA
    481af7f View commit details
    Browse the repository at this point in the history
  2. Test parsing of path-references

    Julow committed Jul 10, 2024
    Configuration menu
    Copy the full SHA
    b6e46ce View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    175e93f View commit details
    Browse the repository at this point in the history
  4. Allow prefixed page reference

    Julow committed Jul 10, 2024
    Configuration menu
    Copy the full SHA
    861d61b View commit details
    Browse the repository at this point in the history
  5. Update Changes

    Julow committed Jul 10, 2024
    Configuration menu
    Copy the full SHA
    75a9ac6 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    559a773 View commit details
    Browse the repository at this point in the history
  7. Represent page and module paths

    The Page_path constructor cannot represent these references
    differerently:
    
        {!foo/module-Bar}
        {!foo/page-Bar}
        {!foo/Bar}
    
    The constructors Module_path and Any_path are added in the different
    reference types and pipeped through to Ref_tools.
    
    This also fixes the parsing of paths as label parents and add better
    error messages when the last component of a path isn't as expected.
    Julow committed Jul 10, 2024
    Configuration menu
    Copy the full SHA
    2fa7483 View commit details
    Browse the repository at this point in the history
  8. Rename Reference.Path into Reference.Hierarchy

    'Path' was an overloaded term.
    Julow committed Jul 10, 2024
    Configuration menu
    Copy the full SHA
    d655956 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    4b2c293 View commit details
    Browse the repository at this point in the history
  10. Parsing error on path-reference with empty components

    Also improve the path parsing to be more readable.
    Julow committed Jul 10, 2024
    Configuration menu
    Copy the full SHA
    e66ecbd View commit details
    Browse the repository at this point in the history
  11. Remove unreachable cases

    Julow committed Jul 10, 2024
    Configuration menu
    Copy the full SHA
    fcaa46e View commit details
    Browse the repository at this point in the history