rokucommunity / rokucommunity/brighterscript

provide codeAction in .bs when callfunc can be refactored to callfunc operator

Open
#240 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

BrighterScript enhancement LanguageServer
Dominant language
TypeScript
Stars
208
Forks
68
Avg merge
8h 39m
Merged PRs (30d)
39

Description

would be great if the parser could identify when brs syntax could be upgraded to bs syntax.

for example, consider:

node.callFunc("funcName", invalid)

this could be :
node@.funcName()

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 locating the parser and codeAction entry points for .bs files, then trace how callFunc syntax is represented. Define the supported conversion from node.callFunc("funcName", invalid) to node@.funcName(), including when arguments are valid; done means the appropriate code action is offered only for convertible cases and is covered by tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
compilers, devtools
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.