* don't track computed name if symbol has no declaration
* add compiler test
* add non serializable property declaration emit error
* don't track computed name if symbol has no declaration
* fix small stuff
* rebase: add non serializable property declaration emit error
* use symbolToString instead of symbolName
Instead of letting `createTemplate*` generate a broken raw string from
the cooked one, grab the source code for it.
Also, add a missing bit to `\`-quote `$`s. As the comment in the code
says, it could just `\`-quote `${` since other `$`s are valid, but I
think that it's less confusing to always quote $s (but the change is in
the comment if minimalism is preferred).
Also, a small-but-confusing bug in `getCookedText()`.
Many tests for all of this.
Fixes#40625
* Guard against creating auto import provider without host program
* Also don’t pre-seed auto import provider if updateGraph didn’t produce a program
* Rename `isFirstLoad`
Error message improvement for unexpected tokens in the following situations:
* A word was parsed that seems to have a low edit distance from a known common keyword
* A word was parsed that seems to be a known common keyword and a name _without_ a space in-between
* Parsing in a particular type of node (mostly a class property declaration) got a different word or token than expected
___
* Specific diagnostic suggestions for unexpected keywords or identifier
* Don't reach into there, that's not allowed
* Improved error when there is already an initializer
* Specific module error message for invalid template literal strings
* Skip 'unexpected keyword or identifier' diagnostics for declare nodes
* Improve error for function calls in type positions
* Switch class properties to old diagnostic
* Corrected errors in class members and reused existing textToKeywordObj map
* Corrected more baselines from the merge
* Update src/compiler/parser.ts
Co-authored-by: Daniel Rosenwasser <DanielRosenwasser@users.noreply.github.com>
* Mostly addressed feedback
* Clarified function call type message
* Split up and clarified parsing vs error functions
* Swap interface name complaints back, and skip new errors on unknown (invalid) tokens
* Used tokenToString, not a raw semicolon
* Inline getExpressionText helper
* Remove remarks in src/compiler/parser.ts
Co-authored-by: Daniel Rosenwasser <DanielRosenwasser@users.noreply.github.com>