1
0
Fork 0
mirror of https://github.com/kou029w/quot.git synced 2025-01-19 08:28:09 +00:00
quot/app/syntax/quot.grammar

14 lines
376 B
Text

@top Document { heading line* }
heading { Heading? "\n" }
line { Indent* ((AutoLink | Code | word) space*)* "\n" }
@tokens {
space { $[ \t] }
word { ![ \t\n]+ }
Heading { ![\n]+ }
Indent { space }
AutoLink { ("http" | "https") "://" word }
Code { "`" ![`\n]+ "`" | ($[$%] " ") ![\n]+ }
@precedence { AutoLink, Code, word }
}