alibaba / alibaba/QLExpress

希望加一个能获取被赋值(新增/更新)的上下文变量名的方法

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

Nobody has claimed this yet.

Dominant language
Java
Stars
5.6k
Forks
1.2k
PR merge metrics
No merged PRs in 30d

Description

@DQinYuan 目前Express4Runner有可以获取依赖的外部变量的方法getOutVarNames,为了更好的对表达式的运行结果进行预判或限制,希望能添加一个能获取被赋值(新增/更新)的上下文变量名的方法,如:getAssignVarNames
实现效果:
getAssignVarNames("a=b")---["a"]
getOutVarNames("a=b")---["b"]

getAssignVarNames("object a=b")---[]
getOutVarNames("object a=b")---["b"]

getAssignVarNames("a=1;b+=1")---["a","b"]
getOutVarNames("a=1;b+=1")---["b"]

getAssignVarNames("a=1;b=a+1")---["a","b"]
getOutVarNames("a=1;b=a+1")---[]

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 with Express4Runner and its existing getOutVarNames method. Compare how the four examples distinguish assigned variables from external dependencies, then trace the expression handling used there. Done means exposing getAssignVarNames with results matching all examples, including declarations and compound assignments.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
compilers
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
68/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.