FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Add support for class-inheritance-from expressions · textmate/javascript.tmbundle@feadd20 · GitHub

Commit feadd20

Browse files
authored andcommitted
Add support for class-inheritance-from expressions
1 parent 746c2be commit feadd20

1 file changed

Lines changed: 24 additions & 16 deletions

File tree

‎Syntaxes/JavaScript.plist‎

Lines changed: 24 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -626,7 +626,21 @@
626626
</array>
627627
</dict>
628628
<dict>
629-
<key>captures</key>
629+
<key>begin</key>
630+
<string>(?x)
631+
\b(class)
632+
(?:
633+
\s+
634+
([\p{L}\p{Nl}$_][\p{L}\p{Nl}$\p{Mn}\p{Mc}\p{Nd}\p{Pc}\x{200C}\x{200D}]*)
635+
)?
636+
(?:
637+
\s+
638+
(extends)
639+
\s+
640+
(?:\b([\p{L}\p{Nl}$_][\p{L}\p{Nl}$\p{Mn}\p{Mc}\p{Nd}\p{Pc}\x{200C}\x{200D}]*)\b(?![\(]))?
641+
)?
642+
</string>
643+
<key>beginCaptures</key>
630644
<dict>
631645
<key>1</key>
632646
<dict>
@@ -649,23 +663,17 @@
649663
<string>entity.other.inherited-class.js</string>
650664
</dict>
651665
</dict>
652-
<key>match</key>
653-
<string>(?x)
654-
\b(class)
655-
(?:
656-
\s+
657-
([\p{L}\p{Nl}$_][\p{L}\p{Nl}$\p{Mn}\p{Mc}\p{Nd}\p{Pc}\x{200C}\x{200D}]*)
658-
)?
659-
(?:
660-
\s+
661-
(extends)
662-
\s+
663-
([\p{L}\p{Nl}$_][\p{L}\p{Nl}$\p{Mn}\p{Mc}\p{Nd}\p{Pc}\x{200C}\x{200D}]*)
664-
)?
665-
\s*($|(?=\{))
666-
</string>
666+
<key>end</key>
667+
<string>\s*($|(?=\{))</string>
667668
<key>name</key>
668669
<string>meta.class.js</string>
670+
<key>patterns</key>
671+
<array>
672+
<dict>
673+
<key>include</key>
674+
<string>#function-call</string>
675+
</dict>
676+
</array>
669677
</dict>
670678
<dict>
671679
<key>begin</key>

0 commit comments

Comments
 (0)

Back | FazBrowse Home | New Git URL