3 ms·
'(' is no longer context-free and is inconsistent i would not see it that way. "(" still starts a group, now it would just be either a tag or an attribute. yo
by em-bee 3y ago
'(' is no longer context-free and is inconsistent
i would not see it that way. "(" still starts a group, now it would just be either a tag or an attribute.
you could still parse the whole tree into a native data structure based on the parentheses alone (well, except for the significant spaces between tags, but that's another issue), and later look at the first element in each group to decide if it is a tag or an attribute
the same is true when writing. an attribute name starts with a colon ":foo". if you want to add a value to the attribute, you have to use "()" to group it with its name: "(:foo bar)"
another benefit is that you can write: (:class foo bar baz) instead of :class="foo bar baz"