You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently comments defined in a grammar using the directives %line_comment and %block_comment are simply skipped.
Since comments are often needed in scenarios like code formatting e.g. in language servers, this limits the usefulness of these directives and even forces the user to include comments in his grammar definition explicitly, which can be very cumbersome.
Therefore we need a way to provide comments to the user's grammar processing at parse time.
The text was updated successfully, but these errors were encountered:
' parol' v0.22.0 in cunjunction with parol_runtime v0.17.0 provides a minimal solution.
During parse time the user is informed about parsed comments via a new method <UserType>GrammarTrait::on_comment_parsed. If the user needs comments she should provide an own implementation of this method.
Currently comments defined in a grammar using the directives
%line_comment
and%block_comment
are simply skipped.Since comments are often needed in scenarios like code formatting e.g. in language servers, this limits the usefulness of these directives and even forces the user to include comments in his grammar definition explicitly, which can be very cumbersome.
Therefore we need a way to provide comments to the user's grammar processing at parse time.
The text was updated successfully, but these errors were encountered: