Closed willemneal closed 3 years ago
@willemneal Can I also work on this issue?
It hasn't been posted to gitcoin yet, but you'll get notified here when it is.
Issue Status: 1. Open 2. Started 3. Submitted 4. Done
Work has been started.
These users each claimed they can complete the work by 266 years, 3 months from now. Please review their action plans below:
1) developerfred has been approved to start work.
I'm already getting used to typescript and the Near protocol, I would love to do this feature in AssemblyScript.
Learn more on the Gitcoin Issue Details page.
@developerfred Sounds good, but for the fairness of the bounty (and I did edit this so I understand if you missed it):
Briefly describe how you would design
complieTemplateLiteral
and some edge test cases you would add.
Sounds good, but for the fairness of the bounty (and I did edit this so I understand if you missed it):
thanks for letting me know, i wait to be approved or do i keep working?
I'm saying you need to do it be approved. Since it's not first come first served we need a way to make it transparent who was awarded and it just shows us that you have an idea of what you'll be doing. It doesn't have to be more than a couple of sentences.
@willemneal Ah ok! Come on, I will work on the PR: AssemblyScript/assemblyscript#1115 which is already well advanced in its construction, I will follow the literal template pattern ES2015 However, I thought of storing the concatenation in memory in the i32 format, in order not to have a lot of compilation costs and to display converted.
In the first version I will add this specification https://tc39.es/ecma262/#sec-template-literals but I can also add the tags https://tc39.es/ecma262/#sec-tagged-templates
I will write compileTemplateLiteral
in a way that does not affect the performance, I will write the tests according to the specifications and also test the @pulpdrew previous work https://github.com/AssemblyScript/assemblyscript/pull/1427#issuecomment-669603917
Thanks! Sounds great! I'm sorry for the formalities, I'm still new at bounties and want to prevent people starting work before being accepted.
I'm excited to see your progress!
@developerfred Hello from Gitcoin Core - are you still working on this issue? Please submit a WIP PR or comment back within the next 3 days or you will be removed from this ticket and it will be returned to an ‘Open’ status. Please let us know if you have questions!
Funders only: Snooze warnings for 1 day | 3 days | 5 days | 10 days | 100 days
Issue Status: 1. Open 2. Started 3. Submitted 4. Done
@developerfred due to inactivity, we have escalated this issue to Gitcoin's moderation team. Let us know if you believe this has been done in error!
Funders only: Snooze warnings for 1 day | 3 days | 5 days | 10 days | 100 days
@gitcoinbot I'm working on it this week, I'll send the work in progress from the aassemblyscript repo to gitcoin
@willemneal I submitted the work in progress and I continue working on the bounty.
@developerfred Any updates?
String interpolations already implemented
NEAR Bounty Terms
Before beginning work on the bounty, you must submit a proposal. Only if your proposal is accepted will you be able to claim the reward of the bounty.
Background
A key feature in AssemblyScript that many developers expect is string interpolation, or a string with special variables that are inlined.
For example,
Work on this has located in the following PR: https://github.com/AssemblyScript/assemblyscript/pull/1115
You will make a new PR against this PR. This way we can approve it.
As github points out at the bottom of the PR, there are merge conflicts with the current master branch. Thus the first step is to merge with master.
API
As mentioned here, there needs to be new AST node added for template strings:
Adding the following to
src/ast.ts
Then update the following in the
src/parser.ts
to return the newTemplateLiteralExpression
.Update the following method in the Node class in
src/ast.ts
And the following to
src/compiler.ts
As also mentioned in the PR,
expr.toString()
should be compiled for each part and then each must be concatenated.Testing
Add to tests already present in the PR to test more edge cases.
Proposal
Briefly describe how you would design
complieTemplateLiteral
and some edge test cases you would add.