feat: temporary grammar

This commit is contained in:
Mattia Belletti
2025-03-01 12:30:36 +01:00
parent aa3baa780d
commit eed28168ad
31 changed files with 1409 additions and 479 deletions

View File

@@ -17,13 +17,13 @@ CONTENT_TEXT_NO_ESCAPE_SIMPLE:
// - \n\r ==> a new line of content
// - # ==> a tag
// - \, < and - with exceptions (see below)
~[{}|\n\r\\#-<]
~[{}|\n\r\\#-< ]
// any character can be escaped
| '\\' [\u0000-\uFFFF] // TODO: is there a better way to say "any character"?
// accept a - only if not followed by a > (->, a divert)
| '-' { InputStream.LA(1) != '>' }?
// same for threads (<-) and glue (<>)
| '<' { InputStream.LA(1) != '-' && InputStream.LA(1) != '>' }?
// | '<' { InputStream.LA(1) != '-' && InputStream.LA(1) != '>' }?
)+ ;
INLINE_LOGIC_START: '{' ;