TypeScript & TS/JS React: improve types detection, fix float-points & other improvements/fixes
ClosedPublic

Authored by nibags on Dec 31 2018, 7:42 AM.

Details

Summary

Changes:

TypeScript:

  • Don't highlight built-in classes as functions. For example:
let a = Array(12);
  • Fix highlighting of floating points: the rules for detecting floating point aren't in correct order, so numbers like 1.E+3 aren't highlighted correctly.
  • Improved type detection, for example:
hello<string>
let d: string = "hello";
let a: null = null;

In that example, string will be highlighted as "Type/Primitive" only after : and between < and >. In the third line, the first null will be highlighted as "Type/Primitive" and the second null as "Keyword".

TypeScript React:

  • Adapt to the the changes of typescript.xml.

TypeScript React & JavaScript React:

  • Allow type assertion in the tag name, for example: <C<number> />
  • Allow tags after the keywords await & yield.
  • Allow empty tags: <></>.
  • Allow Non-ASCII characters in component tags.
  • Allow inserting code anywhere in a tag. Example: <tag b="hi" { code } />

Diff Detail

Repository
R216 Syntax Highlighting
Branch
update-typescript
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 6492
Build 6510: arc lint + arc unit
nibags created this revision.Dec 31 2018, 7:42 AM
Restricted Application added projects: Kate, Frameworks. · View Herald TranscriptDec 31 2018, 7:42 AM
Restricted Application added subscribers: kde-frameworks-devel, kwrite-devel. · View Herald Transcript
nibags requested review of this revision.Dec 31 2018, 7:42 AM
nibags edited the summary of this revision. (Show Details)Dec 31 2018, 8:04 AM
nibags updated this revision to Diff 48628.Jan 3 2019, 7:48 PM
  • Small modification in comments
nibags edited the summary of this revision. (Show Details)Jan 3 2019, 7:53 PM
dhaumann accepted this revision.Jan 3 2019, 7:57 PM

Ok, will integrate now as well.

This revision is now accepted and ready to land.Jan 3 2019, 7:57 PM
This revision was automatically updated to reflect the committed changes.