From b4256dc2e1352a2b74f29b2650150cc8b57f54ed Mon Sep 17 00:00:00 2001 From: Titus Wormer Date: Thu, 8 Sep 2022 15:46:46 +0200 Subject: Add support for mdx jsx (flow) --- src/event.rs | 54 ++++++++++++++++++++++++++++++++++-------------------- 1 file changed, 34 insertions(+), 20 deletions(-) (limited to 'src/event.rs') diff --git a/src/event.rs b/src/event.rs index b476d45..31059b0 100644 --- a/src/event.rs +++ b/src/event.rs @@ -2732,30 +2732,31 @@ pub enum Name { ThematicBreakSequence, // To do: sort. + MdxJsxFlowTag, MdxJsxTextTag, - MdxJsxTextTagMarker, // void - MdxJsxTextEsWhitespace, // void - MdxJsxTextTagClosingMarker, // void - MdxJsxTextTagName, - MdxJsxTextTagNamePrimary, // void? - MdxJsxTextTagNameMemberMarker, // void - MdxJsxTextTagNamePrefixMarker, // void - MdxJsxTextTagNameMember, // void - MdxJsxTextTagNameLocal, // void - MdxJsxTextTagSelfClosingMarker, // void - MdxJsxTextTagAttribute, - MdxJsxTextTagAttributeName, - MdxJsxTextTagAttributePrimaryName, - MdxJsxTextTagAttributeNamePrefixMarker, // void - MdxJsxTextTagAttributeInitializerMarker, // void - MdxJsxTextTagAttributeNameLocal, // void - MdxJsxTextTagAttributeValueLiteral, - MdxJsxTextTagAttributeValueLiteralMarker, // void - MdxJsxTextTagAttributeValueLiteralValue, + MdxJsxTagMarker, + MdxJsxTagClosingMarker, + MdxJsxTagName, + MdxJsxTagNamePrimary, + MdxJsxTagNameMemberMarker, + MdxJsxTagNamePrefixMarker, + MdxJsxTagNameMember, + MdxJsxTagNameLocal, + MdxJsxTagSelfClosingMarker, + MdxJsxTagAttribute, + MdxJsxTagAttributeName, + MdxJsxTagAttributePrimaryName, + MdxJsxTagAttributeNamePrefixMarker, + MdxJsxTagAttributeInitializerMarker, + MdxJsxTagAttributeNameLocal, + MdxJsxTagAttributeValueLiteral, + MdxJsxTagAttributeValueLiteralMarker, + MdxJsxTagAttributeValueLiteralValue, + MdxJsxEsWhitespace, } /// List of void events, used to make sure everything is working well. -pub const VOID_EVENTS: [Name; 60] = [ +pub const VOID_EVENTS: [Name; 73] = [ Name::AttentionSequence, Name::AutolinkEmail, Name::AutolinkMarker, @@ -2810,6 +2811,19 @@ pub const VOID_EVENTS: [Name; 60] = [ Name::MathFlowChunk, Name::MathTextData, Name::MathTextSequence, + Name::MdxJsxTagMarker, + Name::MdxJsxTagClosingMarker, + Name::MdxJsxTagNamePrimary, + Name::MdxJsxTagNameMemberMarker, + Name::MdxJsxTagNamePrefixMarker, + Name::MdxJsxTagNameMember, + Name::MdxJsxTagNameLocal, + Name::MdxJsxTagSelfClosingMarker, + Name::MdxJsxTagAttributeNamePrefixMarker, + Name::MdxJsxTagAttributeInitializerMarker, + Name::MdxJsxTagAttributeNameLocal, + Name::MdxJsxTagAttributeValueLiteralMarker, + Name::MdxJsxEsWhitespace, Name::ReferenceMarker, Name::ResourceMarker, Name::ResourceTitleMarker, -- cgit