tree_sitter_xml

Constant XML_HIGHLIGHT_QUERY

Source
pub const XML_HIGHLIGHT_QUERY: &str = ";; XML declaration\n\n\"xml\" @keyword\n\n[ \"version\" \"encoding\" \"standalone\" ] @property\n\n(EncName) @string.special\n\n(VersionNum) @number\n\n[ \"yes\" \"no\" ] @boolean\n\n;; Processing instructions\n\n(PI) @embedded\n\n(PI (PITarget) @keyword)\n\n;; Element declaration\n\n(elementdecl\n  \"ELEMENT\" @keyword\n  (Name) @tag)\n\n(contentspec\n  (_ (Name) @property))\n\n\"#PCDATA\" @type.builtin\n\n[ \"EMPTY\" \"ANY\" ] @string.special.symbol\n\n[ \"*\" \"?\" \"+\" ] @operator\n\n;; Entity declaration\n\n(GEDecl\n  \"ENTITY\" @keyword\n  (Name) @constant)\n\n(GEDecl (EntityValue) @string)\n\n(NDataDecl\n  \"NDATA\" @keyword\n  (Name) @label)\n\n;; Parsed entity declaration\n\n(PEDecl\n  \"ENTITY\" @keyword\n  \"%\" @operator\n  (Name) @constant)\n\n(PEDecl (EntityValue) @string)\n\n;; Notation declaration\n\n(NotationDecl\n  \"NOTATION\" @keyword\n  (Name) @constant)\n\n(NotationDecl\n  (ExternalID\n    (SystemLiteral (URI) @string.special)))\n\n;; Attlist declaration\n\n(AttlistDecl\n  \"ATTLIST\" @keyword\n  (Name) @tag)\n\n(AttDef (Name) @property)\n\n(AttDef (Enumeration (Nmtoken) @string))\n\n(DefaultDecl (AttValue) @string)\n\n[\n  (StringType)\n  (TokenizedType)\n] @type.builtin\n\n(NotationType \"NOTATION\" @type.builtin)\n\n[\n  \"#REQUIRED\"\n  \"#IMPLIED\"\n  \"#FIXED\"\n] @attribute\n\n;; Entities\n\n(EntityRef) @constant\n\n((EntityRef) @constant.builtin\n (#any-of? @constant.builtin\n   \"&amp;\" \"&lt;\" \"&gt;\" \"&quot;\" \"&apos;\"))\n\n(CharRef) @constant\n\n(PEReference) @constant\n\n;; External references\n\n[ \"PUBLIC\" \"SYSTEM\" ] @keyword\n\n(PubidLiteral) @string.special\n\n(SystemLiteral (URI) @markup.link)\n\n;; Processing instructions\n\n(XmlModelPI \"xml-model\" @keyword)\n\n(StyleSheetPI \"xml-stylesheet\" @keyword)\n\n(PseudoAtt (Name) @property)\n\n(PseudoAtt (PseudoAttValue) @string)\n\n;; Doctype declaration\n\n(doctypedecl \"DOCTYPE\" @keyword)\n\n(doctypedecl (Name) @type)\n\n;; Tags\n\n(STag (Name) @tag)\n\n(ETag (Name) @tag)\n\n(EmptyElemTag (Name) @tag)\n\n;; Attributes\n\n(Attribute (Name) @property)\n\n(Attribute (AttValue) @string)\n\n;; Delimiters & punctuation\n\n[\n \"<?\" \"?>\"\n \"<!\" \"]]>\"\n \"<\" \">\"\n \"</\" \"/>\"\n] @punctuation.delimiter\n\n[ \"(\" \")\" \"[\" \"]\" ] @punctuation.bracket\n\n[ \"\\\"\" \"\'\" ] @punctuation.delimiter\n\n[ \",\" \"|\" \"=\" ] @operator\n\n;; Text\n\n(CharData) @markup\n\n(CDSect\n  (CDStart) @markup.heading\n  (CData) @markup.raw\n  \"]]>\" @markup.heading)\n\n;; Misc\n\n(Comment) @comment\n\n(ERROR) @error\n";
Expand description

The syntax highlighting queries for XML.