racket / racket/rhombus

`Syntax.group_source_properties` does not round trip

Open
#557 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Racket
Stars
601
Forks
74
Avg merge
2d 10h
Merged PRs (30d)
5

Description

Example:

block:
  let g :~ Group = 'foo bar baz'
  let new_g :~ Group:
    let (prefix, content, tail, suffix):
      g.group_source_properties()
    g.group_source_properties(prefix, content, tail, suffix)
  values(
    g.to_source_string(),
    new_g.to_source_string(),
  )

This gives "foo bar baz" vs. "". Compare with Syntax.source_properties:

block:
  let t :~ Term = 'foo'
  let new_t :~ Term:
    let (prefix, content, tail, suffix):
      t.source_properties()
    t.source_properties(prefix, content, tail, suffix)
  values(
    t.to_source_string(),
    new_t.to_source_string(),
  )

This gives "foo" vs. "foo" as expected.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by running the issue's Rhombus example and compare Syntax.group_source_properties with Syntax.source_properties. Trace the group_source_properties entry point to determine why reconstructing a Group loses its content, then verify that the original and reconstructed values produce matching source strings.

Written by the indexing model from the issue text.

Assessment

Domain
compilers
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.