This repository was archived by the owner on May 28, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +30
-0
lines changed Expand file tree Collapse file tree 1 file changed +30
-0
lines changed Original file line number Diff line number Diff line change @@ -855,6 +855,36 @@ pub(crate) enum Ignore {
855
855
Some ( Vec < String > ) ,
856
856
}
857
857
858
+ /// This is the parser for fenced codeblocks attributes. It implements the following eBNF:
859
+ ///
860
+ /// ```eBNF
861
+ /// lang-string = *(token-list / delimited-attribute-list / comment)
862
+ ///
863
+ /// bareword = CHAR *(CHAR)
864
+ /// quoted-string = QUOTE *(NONQUOTE) QUOTE
865
+ /// token = bareword / quoted-string
866
+ /// sep = COMMA/WS *(COMMA/WS)
867
+ /// attribute = (DOT token)/(token EQUAL token)
868
+ /// attribute-list = [sep] attribute *(sep attribute) [sep]
869
+ /// delimited-attribute-list = OPEN-CURLY-BRACKET attribute-list CLOSE-CURLY-BRACKET
870
+ /// token-list = [sep] token *(sep token) [sep]
871
+ /// comment = OPEN_PAREN *(all characters) CLOSE_PAREN
872
+ ///
873
+ /// OPEN_PAREN = "("
874
+ /// CLOSE_PARENT = ")"
875
+ /// OPEN-CURLY-BRACKET = "{"
876
+ /// CLOSE-CURLY-BRACKET = "}"
877
+ /// CHAR = ALPHA / DIGIT / "_" / "-" / ":"
878
+ /// QUOTE = %x22
879
+ /// NONQUOTE = %x09 / %x20 / %x21 / %x23-7E ; TAB / SPACE / all printable characters except `"`
880
+ /// COMMA = ","
881
+ /// DOT = "."
882
+ /// EQUAL = "="
883
+ ///
884
+ /// ALPHA = %x41-5A / %x61-7A ; A-Z / a-z
885
+ /// DIGIT = %x30-39
886
+ /// WS = %x09 / " "
887
+ /// ```
858
888
pub ( crate ) struct TagIterator < ' a , ' tcx > {
859
889
inner : Peekable < CharIndices < ' a > > ,
860
890
data : & ' a str ,
You can’t perform that action at this time.
0 commit comments