Skip to content

Good first features to contribute #26

@andrei-markeev

Description

@andrei-markeev

There're now several simple-to-implement standard calls which can significantly improve overall range of supported by TS2C ES3 features. Very good for start. If somebody wanted to contribute to the project, here you go, pick one of these:

  • decodeURI
  • decodeURIComponent
  • encodeURI
  • encodeURIComponent
  • String.toLowerCase
  • String.toUpperCase

Let me know which one you picked in the comments.

Notes:

  1. You can use src/standard/string/substring.ts as a reference:
    • implement Resolver
    • implement code template
    • add flag to HeaderFlags in program.ts
    • add function implementation and necessary dependencies to program.ts same as headerFlags.str_substring
  2. Read src/README.md
  3. Read ES3 spec (no need to read the whole spec, but at least read intently about the function that you're implementing)
  4. Remember that ES3 uses UTF-16 encoding and this should be reflected in the implementation. Using ordinary C string operations isn't enough
  5. Remember to use only C89 standard features in C implementation (gcc with flags -ansi -pedantic)
  6. Create tests under tests/strings

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions