-
Notifications
You must be signed in to change notification settings - Fork 97
Open
Labels
Description
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:
- 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
- Read src/README.md
- Read ES3 spec (no need to read the whole spec, but at least read intently about the function that you're implementing)
- Remember that ES3 uses UTF-16 encoding and this should be reflected in the implementation. Using ordinary C string operations isn't enough
- Remember to use only C89 standard features in C implementation (gcc with flags
-ansi -pedantic) - Create tests under tests/strings