Closed coemgenuslcp closed 3 years ago
Parenthesis are used to embed attribute assignments, e.g.
[node_name ( a1 = v1 a2 = v2 ) content]
In some cases the parenthesis are optional (lenient parsing).
In your case the compiler thinks that some
is an attribute name. Therefore it expects the =
.
If a node has no attributes, but text that starts with (
(as in your case), one has to explicitly state that there are no attributes, by using ()
:
[el () (some) text here]
Note: This behavior will slightly change and will be better documented in PML 2.0 (a major update scheduled to be published next month). For example, the space after el
in the above code is required in PML 1.5, but will be optional in PML 2.0. You'll be able to write:
[el() (some) text here]
or even:
[el()(some) text here]
In version 2.0.0 chapter Lenient Parsing has been added to document the behavior.
If the
el
node begins with an open parenthesis, the compiler errs as below. What is the error message talking about when it says it expects a=
? Are parentheses special?