liquid-java / liquid-java/liquidjava

Change instance variable numbers for line numbers instead of counter

Open
#132 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement good first issue
Dominant language
Java
Stars
67
Forks
36
Avg merge
10d 18h
Merged PRs (30d)
3

Description

Whenever we are creating a new instance of a variable or a fresh one, we keep the variable name and concatenate it with an incremental counter (e.g., a0, x1, y2).
A simple change would be to use the line number where this value was introduced, instead of the counter.
Example:

Image

The error could be `#x_25 == #x_24 - 10` where `24` and `25` are the lines where these were introduced.
A question could be, if multiple vars are changed could we still use the same tactic? Lets try and make some tests to see.

Contributor guide

Open the contributing guide

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 locating the code that creates fresh instance-variable names and the existing tests for generated names. Check how line numbers are available at each introduction, then add tests covering the proposed line-based names and cases where multiple variables change together; done means the tests define and confirm the intended naming behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
compilers
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 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.